[Xfce4-commits] <xfwm4:xfce-4.8> Keep window fully visible on screen on size request
Olivier Fourdan
noreply at xfce.org
Fri Sep 9 09:22:01 CEST 2011
Updating branch refs/heads/xfce-4.8
to cee208fd0011cf58442856fba4c0c9e0adff9bba (commit)
from 85f6c0b6127c1c2b5fa9f2cdbea8935b3d31ee1f (commit)
commit cee208fd0011cf58442856fba4c0c9e0adff9bba
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 41a674a..9290b79 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