]> git.sur5r.net Git - i3/i3/commitdiff
Ensure a minimum size of 25px when resizing windows
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 24 Jun 2009 16:31:43 +0000 (18:31 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 24 Jun 2009 16:31:43 +0000 (18:31 +0200)
src/resize.c

index 3a639e2ede9587f8fdb4e0c53cd11f3c375c86fc..3d6344202a63bc642e64d4f1be05d796cc126a7c 100644 (file)
@@ -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;