Skip to content

Loss of touch input on Virtual Display after switching focus away from scrcpy #6643

@Shrey113

Description

@Shrey113

Bug Description

When using scrcpy with a virtual display, touch/input works correctly at first.
After switching focus away from the scrcpy window to another application (for example, a browser) and returning later, touch/input stops working while the video continues to display normally.


Steps to Reproduce

  1. Run scrcpy with virtual display:

    scrcpy -s 192.0.0.2 --new-display=1920x1080/280 --no-audio --start-app=com.example.androiddex --no-vd-system-decorations

  2. Virtual display opens and touch/input works correctly.

  3. Switch focus to another desktop application.

  4. After some time, return to the scrcpy window.


Expected Behavior

Touch/input control should continue working after refocusing the scrcpy window.


Actual Behavior

  • Screen continues to display normally.
  • Touch/input control stops working.

Logs

Command used:

adb -s 192.0.0.2:5555 logcat -v time | findstr /i "scrcpy Display Surface InputController MotionEvent KeyEvent InputDispatcher InputReader"

Log output:
https://github.com/Shrey113/all_app_updates/releases/download/Test/scrcpy_vd_control.txt


Device Information

  • Device: OnePlus 11 5G
  • Android Version: Android 16
  • Lock Screen Enabled: Yes

Notes

Additional logs or test cases can be provided if required. @rom1v

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions