GNOME Bugzilla – Bug 661427
window: add a _MUTTER_APPEARS_FOCUSED X property
Last modified: 2011-11-08 20:00:39 UTC
The aim here is to be able to implement this design: https://gitorious.org/gnome-design/gnome-design/blobs/master/mockups/theming/unfocused-window.png . 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?
Created attachment 198754 [details] [review] window: add a _MUTTER_APPEARS_FOCUSED X property
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.
Created attachment 200051 [details] [review] window: add a _GNOME_WM_STATE_UNFOCUSED hint to _NET_WM_STATE 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 661428#c12.
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.
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.
s/GNOME/NET the atom's name since there seems to be defacto acceptance of it in the wm-spec mailing list.