From 3cfe1b35e0b4ac3a0a83eb631bd0243c42081684 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 3 Mar 2010 09:32:31 +0100 Subject: [PATCH] Update fullscreen client position/size when an output changes (Thanks Merovius) This fixes #187. --- src/randr.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/randr.c b/src/randr.c index cc9efb25..500ce5d5 100644 --- a/src/randr.c +++ b/src/randr.c @@ -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); + } } } -- 2.39.5