From: Michael Stapelberg Date: Wed, 24 Jun 2009 16:31:43 +0000 (+0200) Subject: Ensure a minimum size of 25px when resizing windows X-Git-Tag: 3.b~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7773a3e5dd2a39ef60aaeeb5a254b4701bc0a268;p=i3%2Fi3 Ensure a minimum size of 25px when resizing windows --- diff --git a/src/resize.c b/src/resize.c index 3a639e2e..3d634420 100644 --- a/src/resize.c +++ b/src/resize.c @@ -97,15 +97,15 @@ int resize_graphical_handler(xcb_connection_t *conn, Workspace *ws, int first, i LOG("new x = %d, y = %d\n", new_x, new_y); if (orientation == O_VERTICAL) { /* Check if the new coordinates are within screen boundaries */ - if (new_x > (screen->rect.x + screen->rect.width) || - new_x < screen->rect.x) + if (new_x > (screen->rect.x + screen->rect.width - 25) || + new_x < (screen->rect.x + 25)) return; values[0] = new_position = new_x; xcb_configure_window(conn, helpwin, XCB_CONFIG_WINDOW_X, values); } else { - if (new_y > (screen->rect.y + screen->rect.height) || - new_y < screen->rect.y) + if (new_y > (screen->rect.y + screen->rect.height - 25) || + new_y < (screen->rect.y + 25)) return; values[0] = new_position = new_y;