]> git.sur5r.net Git - i3/i3/commitdiff
Update fullscreen client position/size when an output changes (Thanks Merovius)
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 3 Mar 2010 08:32:31 +0000 (09:32 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 3 Mar 2010 08:32:31 +0000 (09:32 +0100)
This fixes #187.

src/randr.c

index cc9efb25af0bb678a4098d0eeec9da2b706f38a3..500ce5d5608a6b553b2bfaf413e9bcfd8b99a4aa 100644 (file)
@@ -252,6 +252,18 @@ static void output_change_mode(xcb_connection_t *conn, Output *output) {
 
                 SLIST_FOREACH(client, &(ws->focus_stack), focus_clients)
                         client->force_reconfigure = true;
+
+                /* Update the dimensions of a fullscreen client, if any */
+                if (ws->fullscreen_client != NULL) {
+                        DLOG("Updating fullscreen client size\n");
+                        client = ws->fullscreen_client;
+                        Rect r = ws->rect;
+                        xcb_set_window_rect(conn, client->frame, r);
+
+                        r.x = 0;
+                        r.y = 0;
+                        xcb_set_window_rect(conn, client->child, r);
+                }
         }
 }