From 5b95e20a6268309c57af5c3e9d41debc87e30941 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 4 Sep 2012 20:21:07 +0200 Subject: [PATCH] =?utf8?q?Bugfix:=20Don=E2=80=99t=20allow=20ConfigureReque?= =?utf8?q?sts=20while=20in=20fullscreen=20(Thanks=20Piotr)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes a compatibility issue with gnome-terminal and xfce’s terminal, where fullscreening would lead to moving the window and not displaying the contents properly. fixes #788 --- src/handlers.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/handlers.c b/src/handlers.c index cb76eb78..d63a4e5c 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -374,7 +374,19 @@ static void handle_configure_request(xcb_configure_request_event_t *event) { } DLOG("Configure request!\n"); - if (con_is_floating(con) && con_is_leaf(con)) { + + Con *workspace = con_get_workspace(con), + *fullscreen = NULL; + + /* There might not be a corresponding workspace for dock cons, therefore we + * have to be careful here. */ + if (workspace) { + fullscreen = con_get_fullscreen_con(workspace, CF_OUTPUT); + if (!fullscreen) + fullscreen = con_get_fullscreen_con(workspace, CF_GLOBAL); + } + + if (fullscreen != con && con_is_floating(con) && con_is_leaf(con)) { /* find the height for the decorations */ int deco_height = config.font.height + 5; /* we actually need to apply the size/position changes to the *parent* -- 2.39.5