]> git.sur5r.net Git - i3/i3/blobdiff - src/floating.c
Obey minimum size when resizing floating windows
[i3/i3] / src / floating.c
index 2218da29c1bdb2588454ffd013304a4492b60621..6aea7a91636ca4dd6cb5cf8a01bf74238a50defe 100644 (file)
@@ -284,12 +284,10 @@ DRAGGING_CB(resize_window_callback) {
         dest_height = old_rect->height - (new_y - event->root_y);
     else dest_height = old_rect->height + (new_y - event->root_y);
 
-    /* TODO: minimum window size */
-#if 0
     /* Obey minimum window size */
-    dest_width = max(dest_width, client_min_width(client));
-    dest_height = max(dest_height, client_min_height(client));
-#endif
+    Rect minimum = con_minimum_size(con);
+    dest_width = max(dest_width, minimum.width);
+    dest_height = max(dest_height, minimum.height);
 
     /* User wants to keep proportions, so we may have to adjust our values */
     if (params->proportional) {