Android 14: Samsung phones - mouse actions (left click/scroll) stop working on virtual display (original) (raw)

Hi developers.
I am facing an issue when using scrcpy (v2.3.1) after updating my Samsung S22 ultra phone (SM-S908E) from Android 13 to 14.
An other display is automatically created when scrcpy connects with the phone.

Display id numbers before starting scrcpy

  mDisplayId=: 0 -> primary display (phone screen)
  mDisplayId=: 2 -> for Samsung DeX display

Display id numbers after starting scrcpy

  mDisplayId=: 0 -> primary display (phone screen)
  mDisplayId=: 2 -> for Samsung DeX display
  mDisplayId=: 80 -> a new display id is created

A new display (id=80) is created. But there is no issue with this if I want to mirror the phone screen. Everything works perfectly.

Similarly, when I want to mirror virtual display with option (--display-id 90) as some ways mentioned in #1887 (comment) and #1887 (comment), an new display is also created with id=91

  mDisplayId=: 0 -> primary display (phone screen)
  mDisplayId=: 2 -> for Samsung DeX display
  mDisplayId=:90 -> virtual display id
  mDisplayId=:91 -> a new display id is created

scrcpy can show the virtual display (id=90), input text from keyboard works but click action does not work.
I try to perform input events by using adb and found that virtual display can receive inputs via display with id=91 instead of id=90

adb shell input -d 90 tap 100 800 -> not work
adb shell input -d 91 tap 100 800 -> work

-> I think the created display (id=91) is used for receiving the tap/click events. In order to prove that I start another scrcpy with --display-id=91 option. Another scrcpy can show the virtual display content and all click events work (they are injected to display with id=91).
I think this may be the intention of Samsung for Samsung DeX mode or something else.

Can you help give adivces on this case? Thanks,