Respect Motif hint for window decorations

When the _MOTIF_WM_HINTS property of a window specifies it should have
no title bar, or no decorations at all, respond by setting the border
style of that container to BS_PIXEL or BS_NONE respectively.

This comes from the old Motif window manager. It was originally intended
to specify exactly what sort of decorations a window should have, and
exactly what sort of user input it should respond to. The EWMH spec
intended to replace Motif hints with _NET_WM_WINDOW_TYPE, but it is
still in use by popular widget toolkits such as GTK+ and Java AWT.

i3's implementation simply mirrors Gnome's Metacity. Official
documentation of this hint is nowhere to be found.

For more information see:
https://people.gnome.org/~tthurman/docs/metacity/xprops_8h-source.html
http://stackoverflow.com/questions/13787553/detect-if-a-x11-window-has-decorations

fixes #832
This commit is contained in:
Tony Crisci
2014-01-14 21:16:54 -05:00
committed by Michael Stapelberg
parent 10d7c1a993
commit dee6264d57
4 changed files with 81 additions and 1 deletions

View File

@ -61,3 +61,17 @@ void window_update_role(i3Window *win, xcb_get_property_reply_t *prop, bool befo
*
*/
void window_update_hints(i3Window *win, xcb_get_property_reply_t *prop, bool *urgency_hint);
/**
* Updates the MOTIF_WM_HINTS. The container's border style should be set to
* `motif_border_style' if border style is not BS_NORMAL.
*
* i3 only uses this hint when it specifies a window should have no
* title bar, or no decorations at all, which is how most window managers
* handle it.
*
* The EWMH spec intended to replace Motif hints with _NET_WM_WINDOW_TYPE, but
* it is still in use by popular widget toolkits such as GTK+ and Java AWT.
*
*/
void window_update_motif_hints(i3Window *win, xcb_get_property_reply_t *prop, border_style_t *motif_border_style);