-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigation gestures no longer work using a mouse in fullscreen apps #5545
Comments
As I expected, the change is caused by d193967. With this dirty hack (the position mapper is not updated), it "works": diff --git server/src/main/java/com/genymobile/scrcpy/control/Controller.java server/src/main/java/com/genymobile/scrcpy/control/Controller.java
index f0e4c0374..e0533fff9 100644
--- server/src/main/java/com/genymobile/scrcpy/control/Controller.java
+++ server/src/main/java/com/genymobile/scrcpy/control/Controller.java
@@ -139,7 +139,7 @@ public class Controller implements AsyncProcessor, VirtualDisplayListener {
@Override
public void onNewVirtualDisplay(int virtualDisplayId, PositionMapper positionMapper) {
- DisplayData data = new DisplayData(virtualDisplayId, positionMapper);
+ DisplayData data = new DisplayData(0, positionMapper); // hack
DisplayData old = this.displayData.getAndSet(data);
if (old == null) {
// The very first time the Controller is notified of a new virtual display But I think the correct way is to send mouse events to the (mirroring) virtual display, not the main display. I have no control over how Android reacts to these events though. Side-note: you can press BACK using right-click and HOME using middle-click by default. |
Please test #5605 (comment) |
When mirroring a secondary display, touch and scroll events must be sent to the mirroring virtual display id (with coordinates relative to the virtual display size), rather than to the original display (with coordinates relative to the original display size). This behavior, introduced by d193967, was also applied for the main display for consistency. However, this mechanism has been found to cause some UI elements to become unclickable. To minimize inconveniences, restore the previous behavior when mirroring the main display: send all events to the original display id (0) with coordinates relative to the original display size. Fixes #5545 <#5545> Fixes #5605 <#5605> Refs #4598 <#4598> Refs #5137 <#5137> Refs #5370 <#5370>
When mirroring a secondary display, touch and scroll events must be sent to the mirroring virtual display id (with coordinates relative to the virtual display size), rather than to the original display (with coordinates relative to the original display size). This behavior, introduced by d193967, was also applied for the main display for consistency. However, it has been found to cause some UI elements to become unclickable. To minimize inconveniences, restore the previous behavior when mirroring the main display: send all events to the original display id (0) with coordinates relative to the original display size. Fixes #5545 <#5545> Fixes #5605 <#5605> Refs #4598 <#4598> Refs #5137 <#5137> Refs #5370 <#5370>
Please test #5614. |
tested and it works |
Environment
Describe the bug
Can no longer use navigation gestures (back/home app switch) in fullscreen apps with immersion mode through mouse swiping since upgrading to Scrcpy 3.0 (it's still fine in 2.7).
The text was updated successfully, but these errors were encountered: