[Xfce4-commits] <xfwm4:xfce-4.6> Keep windows entirely visible on screen change (bug #5795)
Olivier Fourdan
noreply at xfce.org
Tue Nov 17 12:54:02 CET 2009
Updating branch refs/heads/xfce-4.6
to 455157569524053f1383a1b6fe1fa3f162e6d5cf (commit)
from 941a74f58fdcfdad7eeb47260deea02b84ef149e (commit)
commit 455157569524053f1383a1b6fe1fa3f162e6d5cf
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat Oct 10 20:05:36 2009 +0200
Keep windows entirely visible on screen change (bug #5795)
src/client.c | 17 ++++++++++-------
src/client.h | 3 ++-
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/client.c b/src/client.c
index b3181e9..2e6342a 100644
--- a/src/client.c
+++ b/src/client.c
@@ -722,8 +722,7 @@ clientConfigure (Client * c, XWindowChanges * wc, unsigned long mask, unsigned s
&& CONSTRAINED_WINDOW (c)
&& !((c->gravity == StaticGravity) && (c->x == 0) && (c->y == 0)))
{
- /* Keep fully visible only on resize */
- clientConstrainPos (c, (mask & (CWWidth | CWHeight)));
+ clientConstrainPos (c, CFG_KEEP_VISIBLE);
if (c->x != px)
{
@@ -804,7 +803,7 @@ clientMoveResizeWindow (Client * c, XWindowChanges * wc, unsigned long mask)
{
ScreenInfo *screen_info;
DisplayInfo *display_info;
- gboolean constrained;
+ unsigned short flags;
g_return_if_fail (c != NULL);
TRACE ("entering clientMoveResizeWindow");
@@ -843,14 +842,18 @@ clientMoveResizeWindow (Client * c, XWindowChanges * wc, unsigned long mask)
}
/* Still a move/resize after cleanup? */
- constrained = FALSE;
+ flags = CFG_REQUEST;
if (mask & (CWX | CWY | CWWidth | CWHeight))
{
if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
{
clientRemoveMaximizeFlag (c);
}
- constrained = TRUE;
+ flags |= CFG_REQUEST;
+ }
+ if (mask & (CWWidth | CWHeight))
+ {
+ flags |= CFG_KEEP_VISIBLE;
}
/*
Let's say that if the client performs a XRaiseWindow, we show the window if focus
@@ -878,7 +881,7 @@ clientMoveResizeWindow (Client * c, XWindowChanges * wc, unsigned long mask)
}
}
/* And finally, configure the window */
- clientConfigure (c, wc, mask, (constrained ? CFG_CONSTRAINED : 0) | CFG_REQUEST);
+ clientConfigure (c, wc, mask, flags);
}
void
@@ -3499,7 +3502,7 @@ clientScreenResize(ScreenInfo *screen_info)
{
wc.x = c->x;
wc.y = c->y;
- clientConfigure (c, &wc, CWX | CWY, CFG_CONSTRAINED | CFG_REQUEST);
+ clientConfigure (c, &wc, CWX | CWY, CFG_CONSTRAINED | CFG_REQUEST | CFG_KEEP_VISIBLE);
}
}
diff --git a/src/client.h b/src/client.h
index 58e0e51..1c6c032 100644
--- a/src/client.h
+++ b/src/client.h
@@ -64,7 +64,8 @@
#define CFG_CONSTRAINED (1<<0)
#define CFG_REQUEST (1<<1)
#define CFG_NOTIFY (1<<2)
-#define CFG_FORCE_REDRAW (1<<3)
+#define CFG_KEEP_VISIBLE (1<<3)
+#define CFG_FORCE_REDRAW (1<<4)
#define INCLUDE_HIDDEN (1<<0)
#define INCLUDE_SHADED (1<<1)
More information about the Xfce4-commits
mailing list