After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661427 - window: add a _MUTTER_APPEARS_FOCUSED X property
window: add a _MUTTER_APPEARS_FOCUSED X property
Product: mutter
Classification: Core
Component: general
Other All
: Normal normal
: ---
Assigned To: mutter-maint
Depends on:
Blocks: 661428
Reported: 2011-10-11 03:16 UTC by Rui Matos
Modified: 2011-11-08 20:00 UTC
See Also:
GNOME target: ---
GNOME version: ---

window: add a _MUTTER_APPEARS_FOCUSED X property (3.13 KB, patch)
2011-10-11 03:16 UTC, Rui Matos
none Details | Review
window: add a _GNOME_WM_APPEARS_FOCUSED X property to all toplevel windows (3.16 KB, patch)
2011-10-20 22:25 UTC, Rui Matos
none Details | Review
window: add a _GNOME_WM_STATE_UNFOCUSED hint to _NET_WM_STATE (3.64 KB, patch)
2011-10-26 18:10 UTC, Rui Matos
accepted-commit_now Details | Review
window: add a _GNOME_WM_STATE_FOCUSED hint to _NET_WM_STATE (3.34 KB, patch)
2011-10-28 23:03 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2011-10-11 03:16:32 UTC
The aim here is to be able to implement this design:

I couldn't find a way to do this without having the WM explicitly tell the
clients if they are "appearing focused" or not. E.g. when you drag a window
around or resize it, the WM will take a grab on the input devices which moves
the X notion of focus that clients have away from them.

1) Is there a better IPC mechanism to communicate this to the client?

2) We probably need a better name for the property.

3) Do we want to try and standardize something like this in the WM spec?
Comment 1 Rui Matos 2011-10-11 03:16:34 UTC
Created attachment 198754 [details] [review]
window: add a _MUTTER_APPEARS_FOCUSED X property
Comment 2 Rui Matos 2011-10-20 22:25:14 UTC
Created attachment 199592 [details] [review]
window: add a _GNOME_WM_APPEARS_FOCUSED X property to all toplevel windows

Renamed the property to be somewhat more neutral.
Comment 3 Rui Matos 2011-10-26 18:10:26 UTC
Created attachment 200051 [details] [review]

This hint reflects whether a window appears focused.

According to the WM spec we are allowed to extend _NET_WM_STATE:

"An implementation MAY add new atoms to this list. Implementations without
extensions MUST ignore any unknown atoms, effectively removing them from the
list. These extension atoms MUST NOT start with the prefix _NET."


I changed the approach a bit according to Matthias' comment on the gtk+ bug
Comment 4 Florian Müllner 2011-10-26 21:19:29 UTC
Review of attachment 200051 [details] [review]:

Looks good to me - however, extending _NET_WM_STATE is a bit of a policy issue, so please double-check with Owen before committing.
Comment 5 Rui Matos 2011-10-28 23:03:13 UTC
Created attachment 200224 [details] [review]
window: add a _GNOME_WM_STATE_FOCUSED hint to _NET_WM_STATE

After talking with Owen we decided to change the hint to _FOCUSED instead.

I also had to move the atom definition to the EWMH_ATOMS_ONLY part to make
mutter export it as a supported feature in _NET_SUPPORTED.
Comment 6 Rui Matos 2011-11-08 20:00:35 UTC
s/GNOME/NET the atom's name since there seems to be defacto acceptance of it
in the wm-spec mailing list.