i3 - improved tiling WM


Add support for new _NET_WM_WINDOW_TYPE

Patch status: needinfo

Patch by none

Long description:

Extended Window Manager Hints specification 1.5 add new hints. This patch makes
i3 aware of them, by making windows with certain types effectively floating.

To apply this patch, use:
curl http://cr.i3wm.org/patch/360/raw.patch | git am

b/include/atoms.xmacro

16
@@ -10,6 +10,12 @@ xmacro(_NET_WM_WINDOW_TYPE_DIALOG)
17
 xmacro(_NET_WM_WINDOW_TYPE_UTILITY)
18
 xmacro(_NET_WM_WINDOW_TYPE_TOOLBAR)
19
 xmacro(_NET_WM_WINDOW_TYPE_SPLASH)
20
+xmacro(_NET_WM_WINDOW_TYPE_COMBO)
21
+xmacro(_NET_WM_WINDOW_TYPE_DROPDOWN_MENU)
22
+xmacro(_NET_WM_WINDOW_TYPE_POPUP_MENU)
23
+xmacro(_NET_WM_WINDOW_TYPE_TOOLTIP)
24
+xmacro(_NET_WM_WINDOW_TYPE_NOTIFICATION)
25
+xmacro(_NET_WM_WINDOW_TYPE_DND)
26
 xmacro(_NET_WM_DESKTOP)
27
 xmacro(_NET_WM_STRUT_PARTIAL)
28
 xmacro(_NET_CLIENT_LIST_STACKING)

b/src/manage.c

33
@@ -391,6 +391,12 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
34
     if (xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_DIALOG) ||
35
         xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_UTILITY) ||
36
         xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_TOOLBAR) ||
37
+        xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_DROPDOWN_MENU) ||
38
+        xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_POPUP_MENU) ||
39
+        xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_TOOLTIP) ||
40
+        xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_NOTIFICATION) ||
41
+        xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_COMBO) ||
42
+        xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_DND) ||
43
         xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_SPLASH)) {
44
         LOG("This window is a dialog window, setting floating\n");
45
         want_floating = true;