From: Michael Stapelberg Date: Tue, 4 Sep 2012 18:21:07 +0000 (+0200) Subject: Bugfix: Don’t allow ConfigureRequests while in fullscreen (Thanks Piotr) X-Git-Tag: 4.3~45^2^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5b95e20a6268309c57af5c3e9d41debc87e30941;p=i3%2Fi3 Bugfix: Don’t allow ConfigureRequests while in fullscreen (Thanks Piotr) 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 --- 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*