[Xfce4-commits] [xfce/xfwm4] 01/01: Fix maximizing when window is tiled vertically or horizontally (bug #10084)

noreply at xfce.org noreply at xfce.org
Mon Dec 1 16:14:04 CET 2014


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

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

commit d577e6195478241241e534d92daffe34f69a088b
Author: Cédric Leporcq <cedl38 at gmail.com>
Date:   Sun Dec 8 21:37:27 2013 +0100

    Fix maximizing when window is tiled vertically or horizontally (bug #10084)
    
    Signed-off-by: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
---
 src/client.c     |   17 +++++++++++------
 src/moveresize.c |    4 ++++
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/client.c b/src/client.c
index dc00545..0e19fdb 100644
--- a/src/client.c
+++ b/src/client.c
@@ -3059,7 +3059,7 @@ clientNewMaxState (Client *c, XWindowChanges *wc, int mode)
          * otherwise it's too confusing when the window changes
          * from horiz to vertical maximization or vice-versa.
          */
-        if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
+        if (FLAG_TEST_ALL (c->flags, CLIENT_FLAG_MAXIMIZED))
         {
             FLAG_UNSET (c->flags, CLIENT_FLAG_MAXIMIZED);
             wc->x = c->old_x;
@@ -3069,6 +3069,16 @@ clientNewMaxState (Client *c, XWindowChanges *wc, int mode)
 
             return;
         }
+        else if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ))
+        {
+            FLAG_SET (c->flags, CLIENT_FLAG_MAXIMIZED_VERT);
+            return;
+        }
+        else if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_VERT))
+        {
+            FLAG_SET (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ);
+            return;
+        }
     }
 
     if (FLAG_TEST (mode, CLIENT_FLAG_MAXIMIZED_HORIZ))
@@ -3317,11 +3327,6 @@ clientTile (Client *c, gint cx, gint cy, tilePositionType tile, gboolean send_co
             break;
     }
 
-    if (!FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
-    {
-        clientSaveSizePos (c);
-    }
-
     old_flags = c->flags;
     FLAG_UNSET (c->flags, CLIENT_FLAG_MAXIMIZED);
     clientNewMaxState (c, &wc, mode);
diff --git a/src/moveresize.c b/src/moveresize.c
index ec0e423..aa60262 100644
--- a/src/moveresize.c
+++ b/src/moveresize.c
@@ -1059,6 +1059,10 @@ clientMoveEventFilter (XEvent * xevent, gpointer data)
         TRACE ("event loop now finished");
         toggled_maximize = FALSE;
         clientMoveWarp (c, NULL);
+        if (!FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
+        {
+            clientSaveSizePos (c);
+        }
         gtk_main_quit ();
     }
 

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


More information about the Xfce4-commits mailing list