[Xfce4-commits] [xfce/xfwm4] 01/02: Do not tile windows if they don't fit in

noreply at xfce.org noreply at xfce.org
Thu Feb 26 22:17:10 CET 2015


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit e776f2785a653d51d65bebe7f9d1431725219c97
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Wed Feb 25 19:33:17 2015 +0100

    Do not tile windows if they don't fit in
    
    Bug: 11599
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/client.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/client.c b/src/client.c
index b753fbf..0a748f0 100644
--- a/src/client.c
+++ b/src/client.c
@@ -3214,7 +3214,8 @@ clientNewMaxSize (Client *c, XWindowChanges *wc, GdkRectangle *rect, tilePositio
         wc->width = full_w - frameExtentLeft (c) - frameExtentRight (c);
         wc->height = full_h - frameExtentTop (c) - frameExtentBottom (c);
 
-        return ((wc->width <= c->size->max_width) && (wc->height <= c->size->max_height));
+        return ((wc->height >= c->size->min_height) && (wc->height <= c->size->max_height) &&
+                (wc->width >= c->size->min_width) && (wc->width <= c->size->max_width));
     }
 
     if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ))
@@ -3236,8 +3237,6 @@ clientNewMaxSize (Client *c, XWindowChanges *wc, GdkRectangle *rect, tilePositio
 
         wc->x = full_x + frameExtentLeft (c);
         wc->width = full_w - frameExtentLeft (c) - frameExtentRight (c);
-
-        return (wc->width <= c->size->max_width);
     }
 
     if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_VERT))
@@ -3259,8 +3258,6 @@ clientNewMaxSize (Client *c, XWindowChanges *wc, GdkRectangle *rect, tilePositio
 
         wc->y = full_y + frameExtentTop (c);
         wc->height = full_h - frameExtentTop (c) - frameExtentBottom (c);
-
-        return (wc->height <= c->size->max_height);
     }
 
     switch (tile)
@@ -3290,11 +3287,11 @@ clientNewMaxSize (Client *c, XWindowChanges *wc, GdkRectangle *rect, tilePositio
                 wc->height = full_h / 2 - frameExtentTop (c) - frameExtentBottom (c);
             break;
         default:
-            return TRUE;
             break;
     }
 
-    return (wc->height <= c->size->max_height) && (wc->width <= c->size->max_width);
+    return ((wc->height >= c->size->min_height) && (wc->height <= c->size->max_height) &&
+            (wc->width >= c->size->min_width) && (wc->width <= c->size->max_width));
 }
 
 gboolean

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list