Open Bug 1681523 Opened 5 years ago Updated 5 years ago

Cannot share individual windows with WebRTC conference in Qubes

Categories

(Core :: WebRTC, defect, P5)

78 Branch
defect

Tracking

()

People

(Reporter: benjaminmoody, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

  1. Create a video conference on https://meet.jit.si/.

  2. Click the "share your screen" button.

Actual results:

Firefox displays a popup below the address bar, asking to confirm the operation. The popup says:

Will you allow meet.jit.si to see your screen?

Window or Screen to share:
[Select Window or Screen]

[] Remember this decision

[Don't Allow]  [Allow]

"Select Window or Screen" is the default option selected in the combobox. The "Allow" button is grayed out. If I click on the combobox, I see it has two options:

Select Window or Screen   (grayed out)
Entire Screen

Expected results:

It appears that what should be happening is that a list of all other application windows should be shown in this list. They aren't.

In other words, I am not able to select a single window to share; instead I'm shown this confusing and apparently non-functional UI.

I am guessing that this is happening because I'm using a window manager (qubes-gui) that is non-reparenting. Whatever mechanism Firefox uses to enumerate the windows on the desktop, it assumes that a window manager is running that moves each toplevel window into a child window that's owned by the window manager. Although this is common, it's not necessary; it's not the case for all window managers, and in particular it's not the case in Qubes.

I'd be happy to provide a fix, or try to, if anyone can point me to the code responsible for enumerating windows on X11 and capturing their contents.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → WebRTC
Product: Firefox → Core

Actually, it sounds like this is a bug in the qubes-gui window manager (i.e. it's not following ICCCM requirements - not Firefox's fault, though it might be nice to have a fix on the Firefox side anyway.)

See https://github.com/QubesOS/qubes-issues/issues/5789 for some details and possible workarounds.

Jan-Ivar, does this sound like something we can work around?

Flags: needinfo?(jib)

I wouldn't know, but it sounds like this is already being worked on in https://github.com/QubesOS/qubes-gui-agent-linux/pull/121 🙌

I'd be happy to provide a fix, or try to, if anyone can point me to the code responsible for enumerating windows on X11 and capturing their contents.

From what I recall from bug 1675764 that's deep in libwebrtc, though any changes there should be coordinated with dminor (cc'ed) since we have a merge coming up.

Flags: needinfo?(jib)

It would be best if a fix was made against upstream libwebrtc (https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/index.md). Once landed, let us know, and we can backport the fixes. I think this is the code you are looking for: https://webrtc.googlesource.com/src/+/master/modules/desktop_capture/linux/window_list_utils.cc. The desktop capture code is an area where we've made a number of local changes, so it's possible that the fix will be Firefox specific, but in this case, I think upstream is the place to start looking.

I'll leave this open so we can track any fixes made upstream.

Severity: -- → S4
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.