]> git.sur5r.net Git - i3/i3/commitdiff
Also set DIALOG, UTILITY and SPLASH windows floating automatically
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 19 Jun 2009 10:05:55 +0000 (12:05 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 19 Jun 2009 10:05:55 +0000 (12:05 +0200)
include/i3.h
include/xcb.h
src/commands.c
src/mainx.c
src/manage.c

index 7bbab415d5dd3cafa0f75c5ff727bb6968a811f0..ccf7a4951552612d00407bc86c429e5c435d9700 100644 (file)
@@ -3,7 +3,7 @@
  *
  * i3 - an improved dynamic tiling window manager
  *
- * (c) 2009 Michael Stapelberg and contributors
+ * © 2009 Michael Stapelberg and contributors
  *
  * See file LICENSE for license information.
  *
@@ -20,7 +20,7 @@
 #ifndef _I3_H
 #define _I3_H
 
-#define NUM_ATOMS 14
+#define NUM_ATOMS 17
 
 extern char **start_argv;
 extern Display *xkbdpy;
index 7f89caaf144881f8abc1226560bcd87a78ff768f..a8a75876907053c2bbf6a1019ea6995965f40a19 100644 (file)
@@ -50,6 +50,9 @@ enum { _NET_SUPPORTED = 0,
         _NET_WM_WINDOW_TYPE,
         _NET_WM_WINDOW_TYPE_DOCK,
         _NET_WM_WINDOW_TYPE_DIALOG,
+        _NET_WM_WINDOW_TYPE_UTILITY,
+        _NET_WM_WINDOW_TYPE_TOOLBAR,
+        _NET_WM_WINDOW_TYPE_SPLASH,
         _NET_WM_DESKTOP,
         _NET_WM_STRUT_PARTIAL,
         WM_PROTOCOLS,
index 274f0e27b8c9c36cc458598c60b79bcfe10ba71b..10ac35f878681d2b893d1617b350f4f3295c2bbe 100644 (file)
@@ -924,7 +924,7 @@ void parse_command(xcb_connection_t *conn, const char *command) {
         }
 
         if (last_focused == NULL) {
-                LOG("Not performing (null) \n");
+                LOG("Not performing (no window found)\n");
                 return;
         }
 
index 67ab25fd055ac0b41d4a04f2dc259eac1470b38b..ca1bc8ad7ce8bf042786042be80e0c5abc1ca1b4 100644 (file)
@@ -161,6 +161,9 @@ int main(int argc, char *argv[], char *env[]) {
         REQUEST_ATOM(_NET_WM_DESKTOP);
         REQUEST_ATOM(_NET_WM_WINDOW_TYPE_DOCK);
         REQUEST_ATOM(_NET_WM_WINDOW_TYPE_DIALOG);
+        REQUEST_ATOM(_NET_WM_WINDOW_TYPE_UTILITY);
+        REQUEST_ATOM(_NET_WM_WINDOW_TYPE_TOOLBAR);
+        REQUEST_ATOM(_NET_WM_WINDOW_TYPE_SPLASH);
         REQUEST_ATOM(_NET_WM_STRUT_PARTIAL);
         REQUEST_ATOM(WM_PROTOCOLS);
         REQUEST_ATOM(WM_DELETE_WINDOW);
@@ -265,6 +268,9 @@ int main(int argc, char *argv[], char *env[]) {
         GET_ATOM(_NET_WM_DESKTOP);
         GET_ATOM(_NET_WM_WINDOW_TYPE_DOCK);
         GET_ATOM(_NET_WM_WINDOW_TYPE_DIALOG);
+        GET_ATOM(_NET_WM_WINDOW_TYPE_UTILITY);
+        GET_ATOM(_NET_WM_WINDOW_TYPE_TOOLBAR);
+        GET_ATOM(_NET_WM_WINDOW_TYPE_SPLASH);
         GET_ATOM(_NET_WM_STRUT_PARTIAL);
         GET_ATOM(WM_PROTOCOLS);
         GET_ATOM(WM_DELETE_WINDOW);
index 72c7bce16f7565571d5d7a907e3f6e7e3ac31ae5..1f79cb94ef8e23effe25499539add1c975a93e87 100644 (file)
@@ -259,7 +259,10 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child,
                                 SLIST_INSERT_HEAD(&(c_ws->screen->dock_clients), new, dock_clients);
                                 /* If it’s a dock we can’t make it float, so we break */
                                 break;
-                        } else if (atom[i] == atoms[_NET_WM_WINDOW_TYPE_DIALOG]) {
+                        } else if (atom[i] == atoms[_NET_WM_WINDOW_TYPE_DIALOG] ||
+                                   atom[i] == atoms[_NET_WM_WINDOW_TYPE_UTILITY] ||
+                                   atom[i] == atoms[_NET_WM_WINDOW_TYPE_TOOLBAR] ||
+                                   atom[i] == atoms[_NET_WM_WINDOW_TYPE_SPLASH]) {
                                 /* Set the dialog window to automatically floating, will be used below */
                                 new->floating = FLOATING_AUTO_ON;
                                 LOG("dialog window, automatically floating\n");