[Xfce4-commits] [xfce/xfwm4] 04/05: Fix maximized size increment regression

noreply at xfce.org noreply at xfce.org
Wed Dec 6 09:55:51 CET 2017


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

o   l   i   v   i   e   r       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfwm4.

commit 54db88acb7e1988d5c39722d639a0347c99fd7b0
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Wed Dec 6 09:43:50 2017 +0100

    Fix maximized size increment regression
    
    Bug: 13954
    
    Commit aee8b25a:
    
        Do not prevent ALT+Mouse resizing for borderless maximized windows.
    
    Introduced a regression with windows using size increment (like most
    terminal emulators).
    
    Fix the size increment issue while preserving the possibility to resize
    maximized window.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/client.c     |  2 +-
 src/moveresize.c | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/client.c b/src/client.c
index 24285ab..9aa57f7 100644
--- a/src/client.c
+++ b/src/client.c
@@ -881,7 +881,7 @@ clientMoveResizeWindow (Client *c, XWindowChanges * wc, unsigned long mask)
         /* Not allowed in fullscreen mode */
         mask &= ~(CWX | CWY | CWWidth | CWHeight);
     }
-    /*clean up buggy requests that set all flags */
+    /* clean up buggy requests that set all flags */
     if ((mask & CWX) && (wc->x == c->x))
     {
         mask &= ~CWX;
diff --git a/src/moveresize.c b/src/moveresize.c
index 4854671..8a23e76 100644
--- a/src/moveresize.c
+++ b/src/moveresize.c
@@ -103,8 +103,10 @@ clientCheckSize (Client * c, int size, int base, int min, int max, int incr, gbo
 
     size_return = size;
 
-    /* Bypass resize increment and max sizes for fullscreen */
-    if (!FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
+    /* Bypass resize increment and max sizes for fullscreen and maximized */
+    if (!FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN)
+        && !(FLAG_TEST_ALL (c->flags, CLIENT_FLAG_MAXIMIZED)
+             && (c->screen_info->params->borderless_maximize)))
     {
 
         if (!source_is_application && (c->size->flags & PResizeInc) && (incr))
@@ -1744,6 +1746,7 @@ clientResize (Client * c, int handle, XfwmEventButton *event)
     passdata.cancel_y = passdata.oy = c->y;
     passdata.cancel_w = passdata.ow = c->width;
     passdata.cancel_h = passdata.oh = c->height;
+    passdata.configure_flags = NO_CFG_FLAG;
     passdata.use_keys = FALSE;
     passdata.grab = FALSE;
     passdata.released = FALSE;
@@ -1841,13 +1844,14 @@ clientResize (Client * c, int handle, XfwmEventButton *event)
         if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
         {
             clientRemoveMaximizeFlag (c);
+            passdata.configure_flags = CFG_FORCE_REDRAW;
         }
         if (FLAG_TEST (c->flags, CLIENT_FLAG_RESTORE_SIZE_POS))
         {
             FLAG_UNSET (c->flags, CLIENT_FLAG_RESTORE_SIZE_POS);
         }
     }
-    clientReconfigure (c, NO_CFG_FLAG);
+    clientReconfigure (c, passdata.configure_flags);
 
     if (passdata.button != AnyButton && !passdata.released)
     {

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


More information about the Xfce4-commits mailing list