Picture-in-Picture doesn't open in a floating window on Linux / bspwm
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox72 | --- | unaffected |
firefox73 | --- | wontfix |
firefox74 | --- | fix-optional |
People
(Reporter: sdk, Assigned: stransky)
References
(Blocks 1 open bug)
Details
(Keywords: nightly-community, regression)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
- Play a video (Youtube, Prime, etc)
- Toggle PiP on (button or shortcut)
Actual results:
PiP doesn't as a floating window with bspwm as a window manager
Expected results:
PiP should open in a floating window like it does on FF 72 (current release version)
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Why is this marked as regression? Is there any working version?
Thanks.
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Martin Stránský [:stransky] from comment #1)
Why is this marked as regression? Is there any working version?
Thanks.
Because it works on 72 (Release) but doesn't on 74 (Nightly).
Updated•5 years ago
|
Reporter | ||
Comment 3•5 years ago
|
||
So, I finally had the time and bandwidth to do a mozregression. Here's the link to the commit that introduced this bug:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=d83d88a474ce1fd7a64c7351a0cf881740cd4347&tochange=374df506a9d412a961df2f3a90e67413434a73f8
Assignee | ||
Comment 4•5 years ago
|
||
That's very interesting, Thanks. Looks like a bug in bspwm window manager. Can you please report it at bspwm project?
Also can you please attach output of 'env | grep XDG' command? We may introduce a workaround for it until it's fixed.
Thanks.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 5•5 years ago
|
||
(In reply to Martin Stránský [:stransky] from comment #4)
That's very interesting, Thanks. Looks like a bug in bspwm window manager. Can you please report it at bspwm project?
Sure I can. Could you give me a bit more detail on why you think it's a bspwm bug so I could include it in my report?
Also can you please attach output of 'env | grep XDG' command? We may introduce a workaround for it until it's fixed.
Here's the output:
XDG_SEAT=seat0
XDG_SESSION_TYPE=tty
XDG_SESSION_CLASS=user
XDG_VTNR=1
XDG_SESSION_ID=1
XDG_RUNTIME_DIR=/run/user/1000
XDG_DATA_DIRS=/home/sdk/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
Thanks!
Assignee | ||
Comment 6•5 years ago
|
||
(In reply to Danny Colin [:sdk] from comment #5)
(In reply to Martin Stránský [:stransky] from comment #4)
That's very interesting, Thanks. Looks like a bug in bspwm window manager. Can you please report it at bspwm project?
Sure I can. Could you give me a bit more detail on why you think it's a bspwm bug so I could include it in my report?
The aspect ratio should to affects window type itself (floating/toplevel/popup whatever).
Also can you please attach output of 'env | grep XDG' command? We may introduce a workaround for it until it's fixed.
Here's the output:
XDG_SEAT=seat0 XDG_SESSION_TYPE=tty XDG_SESSION_CLASS=user XDG_VTNR=1 XDG_SESSION_ID=1 XDG_RUNTIME_DIR=/run/user/1000 XDG_DATA_DIRS=/home/sdk/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
Uff, that's bad. There's no desktop manager/session type ID. bspwm should definitely provide that so we can detect it and disable the aspect ratio geometry hints. For instance gnome sets (on Wayland):
XDG_SESSION_DESKTOP=gnome
XDG_SESSION_TYPE=wayland
XDG_CURRENT_DESKTOP=GNOME
see https://www.freedesktop.org/software/systemd/man/pam_systemd.html for details.
Assignee | ||
Comment 7•4 years ago
|
||
Please use 'widget.use-aspect-ratio' at about:config to disable aspect ratio lock for your WM.
I use bspwm and have been wondering about this also.
Setting widget.use-aspect-ratio to false doesn't make the Picture-in-picture window be the type that is floating by default
I think the bspwm ethos is that the user can "provide" is by setting .profile or whatever to modify the environment; can I ask exactly what environment variables I should be setting to get the Pip window to float automatically? or is it related to the dialog/modal hint for the window?
Looks like FF has changed slightly; via #bspwm, a rule that works, to automatically float PiP windows;
bspc rule -a firefox:Toolkit sticky=on state=floating
Some apps though can make their pop-up windows floating by default (under bspwm), so I was guessing this might be an issue resolved at maybe the NetWM level or something like that?
The aspect ratio of the window is right after PiP/floating it doesn't lock either, even with bspc config honor_size_hints true
. I'm, again, kinda somewhat sure that sure some windows do at least have their aspect locked, but I can't remember one right just now.
Reporter | ||
Comment 10•4 years ago
|
||
I'm, again, kinda somewhat sure that sure some windows do at least have their aspect locked, but I can't remember one right just now.
I know that _NET_WM_WINDOW_TYPE_DIALOG (ex. System Print Dialog in FF) opens as a floating window in bspwm. And yes, bspwm doesn't seem to care about the aspect ratio lock for normal windows. Like Martin suggested, this is something that should be reported upstream but I wouldn't hold my breath to see a fix anytime soon since the bspwm maintainer isn't working actively on bspwm these days.
Comment 11•4 years ago
|
||
@sdk; thanks for that assist in #bspwm
"I know that _NET_WM_WINDOW_TYPE_DIALOG (ex. System Print Dialog in FF) opens as a floating window in bspwm"
Would implementing that for FF PiP windows not go towards resolving the 'open as a floating window' issue?
"bspwm doesn't seem to care about the aspect ratio lock for normal windows."
I remember now that videos in mpv under bspwm have their aspect ratio kept whilst resizing, so could Firefox not do the same unnormal thing for PiP windows?
I'm not sure of the specifics, but from xprop, a video in mpv;
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified size: 1152 by 648
program specified minimum size: 4 by 4
program specified minimum aspect ratio: 1152/648
program specified maximum aspect ratio: 1152/648
window gravity: Center
From xprop on FF PiP (for this);
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 120 by 173
program specified maximum size: 8192 by 8192
program specified minimum aspect ratio: 45329/65536
program specified maximum aspect ratio: 45329/65536
program specified base size: 120 by 173
window gravity: NorthWest
From above; "There's no desktop manager/session type ID. bspwm should definitely provide that so we can detect it and disable the aspect ratio geometry hints."
I've tried setting bspwm specific variations of those XDG evars in .profile and restarting, but a) why would FF wish to disable the aspect ratio hints; because bspwm is expected not to handle that behaviour (though it does with mpv)?
"the bspwm maintainer isn't working actively on bspwm these days"
The last release was two months ago and the last commit was 6 days ago, so maybe it could be said they are at least working on it for theirself, I've not checked the recently active or closed issues though, and while I think it would be at least worth touching base there if required, it would have to be a convincing issue/request :)
Comment 12•4 years ago
|
||
Huh, PiP aspect is actually working, I had set widget.use-aspect-ratio on but I guess I needed to restart Firefox for it to take effect.
Comment 13•4 years ago
|
||
Having the exact same issue on Firefox 82.
I'm using swaywm, so this doesn't seem to be bspwm-specific nor X11-specific.
Comment 14•3 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Updated•2 years ago
|
Description
•