From: Orestis Floros Date: Wed, 22 Aug 2018 11:23:01 +0000 (+0300) Subject: handle_configure_request: check for scratchpad once X-Git-Tag: 4.16~53^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F3368%2Fhead;p=i3%2Fi3 handle_configure_request: check for scratchpad once --- diff --git a/src/handlers.c b/src/handlers.c index 66b3038a..f632d91c 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -311,6 +311,10 @@ static void handle_configure_request(xcb_configure_request_event_t *event) { DLOG("Configure request!\n"); Con *workspace = con_get_workspace(con); + if (workspace && (strcmp(workspace->name, "__i3_scratch") == 0)) { + DLOG("This is a scratchpad container, ignoring ConfigureRequest\n"); + goto out; + } Con *fullscreen = con_get_fullscreen_covering_ws(workspace); if (fullscreen != con && con_is_floating(con) && con_is_leaf(con)) { @@ -324,12 +328,6 @@ static void handle_configure_request(xcb_configure_request_event_t *event) { bsr.height -= deco_height; } Con *floatingcon = con->parent; - - if (strcmp(con_get_workspace(floatingcon)->name, "__i3_scratch") == 0) { - DLOG("This is a scratchpad container, ignoring ConfigureRequest\n"); - goto out; - } - Rect newrect = floatingcon->rect; if (event->value_mask & XCB_CONFIG_WINDOW_X) { @@ -410,11 +408,6 @@ static void handle_configure_request(xcb_configure_request_event_t *event) { goto out; } - if (strcmp(workspace->name, "__i3_scratch") == 0) { - DLOG("This is a scratchpad container, ignoring ConfigureRequest\n"); - goto out; - } - if (config.focus_on_window_activation == FOWA_FOCUS || (config.focus_on_window_activation == FOWA_SMART && workspace_is_visible(workspace))) { DLOG("Focusing con = %p\n", con); workspace_show(workspace);