summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-10-13 17:34:32 +0200
committerDanny Baumann <dannybaumann@web.de>2007-10-13 17:34:32 +0200
commitf26e7e6b26526ceabe3b68ce7fb61b1864dbb948 (patch)
tree3143bc50801d1f7c93c9818236b3c26a79250b48
parent00e3b952dbacec6a4e8d6b2e122cd7eb7b991d8c (diff)
Clear all coordinates that match the server coordinates from the configure request mask to make sure a synthetic configure notify event is sent whenever needed.
-rw-r--r--src/window.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/src/window.c b/src/window.c
index 4db74712..ae3b40ce 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3704,16 +3704,12 @@ moveResizeWindow (CompWindow *w,
xwcm |= CWWidth;
xwc->width = width;
}
- else
- xwcm &= ~CWWidth;
if (height != w->serverHeight)
{
xwcm |= CWHeight;
xwc->height = height;
}
- else
- xwcm &= ~CWHeight;
}
if (xwcm & (CWX | CWWidth))
@@ -3807,24 +3803,6 @@ moveResizeWindow (CompWindow *w,
}
}
- if (xwcm & CWX)
- {
- if (xwc->x == w->serverX)
- xwcm &= ~CWX;
- }
-
- if (xwcm & CWY)
- {
- if (xwc->y == w->serverY)
- xwcm &= ~CWY;
- }
-
- if (xwcm & CWBorderWidth)
- {
- if (xwc->border_width == w->serverBorderWidth)
- xwcm &= ~CWBorderWidth;
- }
-
/* when horizontally maximized only allow width changes added by
addWindowSizeChanges */
if (w->state & CompWindowStateMaximizedHorzMask)
@@ -3840,6 +3818,25 @@ moveResizeWindow (CompWindow *w,
xwc->width, xwc->height,
xwc->border_width);
+ /* check if the new coordinates are useful and valid (different
+ to current size); if not, we have to clear them to make sure
+ we send a synthetic ConfigureNotify event if all coordinates
+ match the server coordinates */
+ if ((xwcm & CWX) && (xwc->x == w->serverX))
+ xwcm &= ~CWX;
+
+ if ((xwcm & CWY) && (xwc->y == w->serverY))
+ xwcm &= ~CWY;
+
+ if ((xwcm & CWWidth) && (xwc->width == w->serverWidth))
+ xwcm &= ~CWWidth;
+
+ if ((xwcm & CWHeight) && (xwc->height == w->serverHeight))
+ xwcm &= ~CWHeight;
+
+ if ((xwcm & CWBorderWidth) && (xwc->border_width == w->serverBorderWidth))
+ xwcm &= ~CWBorderWidth;
+
/* update saved window coordinates - if CWX or CWY is set for fullscreen
or maximized windows after addWindowSizeChanges, it should be pretty
safe to assume that the saved coordinates should be updated too, e.g.