Skip to content
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

Open
livingator opened this issue Nov 27, 2024 · 1 comment
Open

Comments

@livingator
Copy link

Environment

  • OS: Windows 10
  • Scrcpy version: 3.0
  • Installation method: Windows release
  • Device model: S22 Ultra
  • Android version: Android 14

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).

@rom1v
Copy link
Collaborator

rom1v commented Nov 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants