Closed Bug 1575136 Opened 5 years ago Closed 5 years ago

Distinguish pop-up windows with X11 property

Categories

(Core :: Widget: Gtk, defect)

68 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: astrothayne, Assigned: stransky)

Details

Attachments

(1 file)

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

Steps to reproduce:

  1. Open a popup window (for example: https://codepen.io/tmccombs/pen/bGbwLMe, or something that opens a pop-up authentication flow, such as with google oauth) in linux with X11
  2. Examine properties with xprop

Actual results:

There is nothing to distinguish a pop-up window from a regular window. For my use case, this means it is impossible for me to target pop-up windows with an i3 rule. In particular I would like to configure i3 to make pop-up windows floating, but afaict there is no way to do this with firefox. Instead, the pop-up fills my full screen, which is often a poor experience.

Expected results:

There should be some indication to the window manager that this is a pop-up. For example, chrome sets the WM_WINDOW_ROLE property to "pop-up". Using a special value for the instance or class (WM_CLASS property) or setting the _NET_WM_WINDOW_TYPE to _NET_WM_WINDOW_TYPE_DIALOG would also work for my usecase at least.

Hi,
I'm setting the component in order to involve the development team in reviewing this.
Thanks!

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Dupe of Bug 397251, let's solve it there.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

Does not look like dupe of Bug 397251 after all, better to resolve it here. Do I understand correctly that you want to set WM_WINDOW_ROLE "pop-up" for all popup window?

Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(thayne)
Resolution: DUPLICATE → ---
Assignee: nobody → stransky
Status: REOPENED → NEW

Do I understand correctly that you want to set WM_WINDOW_ROLE "pop-up" for all popup window?

Yes

Flags: needinfo?(thayne)

I think I understand you. But what you need is to set various role to toplevel window as the window from you example is toplevel type but acts as pop-up. The patch attached here does not fix your issue but gives all windows some initial wm_role.

Actual wm_role for each window needs to be set per-window, as it's for PIP window for instance, see:

https://hg.mozilla.org/integration/autoland/file/969b3828a301038c57540d8bffb51539132d393c/toolkit/components/pictureinpicture/PictureInPicture.jsm

the PIP window is created as toplevel/dialog but it uses:

WINDOW_TYPE = "Toolkit:PictureInPicture";

to set different WM_CLASS/WM_ROLE to it.

So what you need is to identify particular windows you're interested in and file bug against Firefox product for it. Feel free to CC me there and I can help to find particular component/reviewer.

Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b4231201173d
[Linux/Gtk] Set initial wm_role for windows, r=jhorak

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: