Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
108.49k stars 10.45k forks source link

Window cannot be shared in browser (firefox, chromium) in linux #2640

Open matthiasneuner opened 2 years ago

matthiasneuner commented 2 years ago

Environment

Describe the bug

In Manjaro with Cinnamon desktop, the window cannot be shared in video conferences both in firefox and chromium. The window is simply not listed among the possible windows: image

However, sharing the complete desktop works fine.

Sharing the window in video conferences would be great for using Android tablets with pen input devices for presentations, sketching, teaching purposes ...

I am not sure how much this is related to scrcpy. On the other hand, I have this issue with no other application.

rom1v commented 2 years ago

You could use V4L2 sink: https://github.com/Genymobile/scrcpy#v4l2loopback

(to expose the device screen as a webcam)

rom1v commented 2 years ago

(That's weird that the window is not listed though.)

matthiasneuner commented 2 years ago

You could use V4L2 sink: https://github.com/Genymobile/scrcpy#v4l2loopback

(to expose the device screen as a webcam)

I already thought of that, but that means usually that I cannot use my real webcam in video conferences simultaneously :-) .

diegofernandess commented 2 years ago

I have the same problem on Debian Sid, Gnome 40.4, Xorg version 1.20.11, Android 11, Scrcpy 1.19 and Google Chrome 94.

rom1v commented 2 years ago

Could please you ask/report to SDL? (scrcpy just opens a SDL window)

diegofernandess commented 2 years ago

The problem seems indeed to be related to SDL. Using libsdl2-2.0-0 version 2.0.16 does not work, whereas the version 2.0.14 works.

m1ga commented 2 years ago

should have looked here before my video call before :rofl: Shared the whole screen at the end but good to know it's not just my browser

slash3g commented 2 years ago

Apparently this bug is caused by a property (WM_NAME) that SDL is not setting on windows created using SDL_CreateWindow. I've reported the bug in libsdl-org/SDL#4924, along with a workaround.

jakob-grabner commented 1 year ago

Looks like the linked issue (https://github.com/libsdl-org/SDL/issues/4924) is fixed already, any chance getting this also fixed in scrcpy?

rom1v commented 1 year ago

I guess scrcpy has nothing to do, upgrade your SDL/distro if the fix is released.

AlexBurdu commented 1 month ago

Running into a similar issue on scrcpy 2.4 on MacOS Sonoma Version 14.5 (23F79), sdl2 is version 2.30.5

The window is not showing up in Dock and when trying to switch windows with Cmd+tab

AlexBurdu commented 1 month ago

Same on scrcpy 2.5.

Also, typing in the scrcpy window does not work as all text ends up in the terminal instead.