]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: partly revert f3880928, client->workspace was not updated (Thanks msi)
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 28 Sep 2009 23:07:51 +0000 (01:07 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 28 Sep 2009 23:07:51 +0000 (01:07 +0200)
src/floating.c

index 180ec429b5f7e7e6febe80effaf36aaaed40654b..b79c0756e8c1d4b572e291c84590c9783884e16b 100644 (file)
@@ -141,21 +141,19 @@ void toggle_floating_mode(xcb_connection_t *conn, Client *client, bool automatic
  *
  */
 void floating_assign_to_workspace(Client *client, Workspace *new_workspace) {
-        Workspace *ws = client->workspace;
-
         /* Remove from focus stack and list of floating clients */
-        SLIST_REMOVE(&(ws->focus_stack), client, Client, focus_clients);
-        TAILQ_REMOVE(&(ws->floating_clients), client, floating_clients);
+        SLIST_REMOVE(&(client->workspace->focus_stack), client, Client, focus_clients);
+        TAILQ_REMOVE(&(client->workspace->floating_clients), client, floating_clients);
 
-        if (ws->fullscreen_client == client)
-                ws->fullscreen_client = NULL;
+        if (client->workspace->fullscreen_client == client)
+                client->workspace->fullscreen_client = NULL;
 
         /* Insert into destination focus stack and list of floating clients */
-        ws = new_workspace;
-        SLIST_INSERT_HEAD(&(ws->focus_stack), client, focus_clients);
-        TAILQ_INSERT_TAIL(&(ws->floating_clients), client, floating_clients);
+        client->workspace = new_workspace;
+        SLIST_INSERT_HEAD(&(client->workspace->focus_stack), client, focus_clients);
+        TAILQ_INSERT_TAIL(&(client->workspace->floating_clients), client, floating_clients);
         if (client->fullscreen)
-                ws->fullscreen_client = client;
+                client->workspace->fullscreen_client = client;
 }
 
 /*