]> git.sur5r.net Git - i3/i3/blobdiff - src/commands.c
Implement clients going automatically into floating
[i3/i3] / src / commands.c
index 8a66f4801f995b27437c209aad167133fa983190..d84adf45d16d4804be3581d37dbe1c50607b908e 100644 (file)
@@ -617,7 +617,7 @@ void show_workspace(xcb_connection_t *conn, int workspace) {
 
         /* Map all floating clients */
         SLIST_FOREACH(client, &(c_ws->focus_stack), focus_clients) {
-                if (!client->floating)
+                if (client->floating <= FLOATING_USER_OFF)
                         continue;
 
                 xcb_map_window(conn, client->frame);
@@ -836,7 +836,7 @@ void parse_command(xcb_connection_t *conn, const char *command) {
 
         /* Is it just 's' for stacking or 'd' for default? */
         if ((command[0] == 's' || command[0] == 'd') && (command[1] == '\0')) {
-                if (last_focused == NULL || last_focused->floating) {
+                if (last_focused == NULL || last_focused->floating >= FLOATING_AUTO_ON) {
                         LOG("not switching, this is a floating client\n");
                         return;
                 }
@@ -852,7 +852,7 @@ void parse_command(xcb_connection_t *conn, const char *command) {
                         return;
                 }
 
-                toggle_floating_mode(conn, last_focused);
+                toggle_floating_mode(conn, last_focused, false);
                 /* delete all empty columns/rows */
                 cleanup_table(conn, last_focused->workspace);
 
@@ -908,13 +908,13 @@ void parse_command(xcb_connection_t *conn, const char *command) {
         }
 
         if (*rest == '\0') {
-                if (last_focused != NULL && last_focused->floating)
+                if (last_focused != NULL && last_focused->floating >= FLOATING_AUTO_ON)
                         move_floating_window_to_workspace(conn, last_focused, workspace);
                 else move_current_window_to_workspace(conn, workspace);
                 return;
         }
 
-        if (last_focused == NULL || last_focused->floating) {
+        if (last_focused == NULL || last_focused->floating >= FLOATING_AUTO_ON) {
                 LOG("Not performing (null or floating) \n");
                 return;
         }