[Xfce4-commits] <xfwm4:master> Keep window fully visible on screen on size request

Olivier Fourdan noreply at xfce.org
Mon May 2 11:20:02 CEST 2011


Updating branch refs/heads/master
         to a517c44802e790408f2cca4d5865ab7f4ebfca0a (commit)
       from cc0b60c771bad7045b856a1987544dc5f73083f5 (commit)

commit a517c44802e790408f2cca4d5865ab7f4ebfca0a
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Mon May 2 10:21:38 2011 +0200

    Keep window fully visible on screen on size request

 src/client.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/client.c b/src/client.c
index f17e885..98f803d 100644
--- a/src/client.c
+++ b/src/client.c
@@ -853,14 +853,19 @@ clientMoveResizeWindow (Client * c, XWindowChanges * wc, unsigned long mask)
         }
         flags |= CFG_REQUEST;
     }
-    if (mask & (CWWidth | CWHeight))
+    if (mask & (CWX | CWY | CWWidth | CWHeight) == (CWWidth | CWHeight))
     {
-        flags |= CFG_KEEP_VISIBLE;
+        /*
+         * The client is resizing its window, but did not specify a
+         * position, make sure the window remains fully visible in that
+         * case so that the user does not have to relocate the window
+         */
+        flags |= CFG_CONSTRAINED | CFG_KEEP_VISIBLE;
     }
     /*
-       Let's say that if the client performs a XRaiseWindow, we show the window if focus
-       stealing prevention is not activated, otherwise we just set the "demands attention"
-       flag...
+     * Let's say that if the client performs a XRaiseWindow, we show the window if focus
+     * stealing prevention is not activated, otherwise we just set the "demands attention"
+     * flag...
      */
     if ((mask & CWStackMode) && (wc->stack_mode == Above) && (wc->sibling == None) && !(c->type & WINDOW_TYPE_DONT_FOCUS))
     {



More information about the Xfce4-commits mailing list