[Xfce4-commits] <xfwm4:xfce-4.6> Fix bug #6543, the window coordonates and size need to be adjusted when a maximized window is undecorated

Olivier Fourdan noreply at xfce.org
Fri Dec 3 15:20:01 CET 2010


Updating branch refs/heads/xfce-4.6
         to 25b6106d533655e85d1f144ecb0383a21f9d5dec (commit)
       from 936b7cec24567cce04575559bd71ae98beb115d3 (commit)

commit 25b6106d533655e85d1f144ecb0383a21f9d5dec
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Fri Dec 3 15:16:21 2010 +0100

    Fix bug #6543, the window coordonates and size need to be adjusted when a maximized window is undecorated

 src/client.c |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/src/client.c b/src/client.c
index a21f899..ae2c85b 100644
--- a/src/client.c
+++ b/src/client.c
@@ -107,6 +107,8 @@ struct _ButtonPressData
 /* Forward decl */
 static void
 clientUpdateIconPix (Client * c);
+static void
+clientNewMaxSize (Client * c, XWindowChanges *wc);
 
 Display *
 clientGetXDisplay (Client * c)
@@ -983,6 +985,13 @@ clientGetMWMHints (Client * c, gboolean update)
         wc.y = c->y;
         wc.width = c->width;
         wc.height = c->height;
+
+        /* If client is maximized, we need to update its coordonates and size as well */
+        if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
+        {
+            clientNewMaxSize (c, &wc);
+        }
+
         clientConfigure (c, &wc, CWX | CWY | CWWidth | CWHeight, CFG_FORCE_REDRAW);
 
         /* MWM hints can add or remove decorations, update NET_FRAME_EXTENTS accordingly */
@@ -3211,20 +3220,10 @@ clientNewMaxSize (Client * c, XWindowChanges *wc)
     {
         /* Adjust size to the largest size available, not covering struts */
         clientMaxSpace (screen_info, &full_x, &full_y, &full_w, &full_h);
-	if(FLAG_TEST(c->xfwm_flags, XFWM_FLAG_HAS_BORDER))
-        {
-            wc->x = full_x + frameLeft (c);
-            wc->y = full_y + frameTop (c);
-            wc->width = full_w - frameLeft (c) - frameRight (c);
-            wc->height = full_h - frameTop (c) - frameBottom (c);
-        }
-        else
-        {
-            wc->x = full_x;
-            wc->y = full_y;
-            wc->width = full_w;
-            wc->height = full_h;
-        }
+        wc->x = full_x + frameLeft (c);
+        wc->y = full_y + frameTop (c);
+        wc->width = full_w - frameLeft (c) - frameRight (c);
+        wc->height = full_h - frameTop (c) - frameBottom (c);
 
         return;
     }



More information about the Xfce4-commits mailing list