summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-03 17:59:39 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-03 17:59:39 +0800
commit44ef02e6bdd0be01ccda7098ab6763efebc338cf (patch)
tree96c29f6577a59c3bc00abc9b2aa8e4d3cd6e8c1e /plugins
parent102f93956cbbf073fb3b4917dba3b0da9df804fc (diff)
downloadcompiz-with-glib-mainloop-44ef02e6bdd0be01ccda7098ab6763efebc338cf.tar.gz
compiz-with-glib-mainloop-44ef02e6bdd0be01ccda7098ab6763efebc338cf.tar.bz2
Fix window position validation for windows that change size without
changing position. Previously, we left the position of windows that have USPosition set untouched, even if they didn't try to change position at all, but only changed size. This caused such windows to become partially offscreen e.g. if they were positioned at the lower edge of the work area before the size change and increased height afterwards. Forward port 3c16152938c44454f42d08a4b92cc46093c9a782 to master
Diffstat (limited to 'plugins')
-rw-r--r--plugins/place/src/place.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/place/src/place.cpp b/plugins/place/src/place.cpp
index c0efb48..4975dc7 100644
--- a/plugins/place/src/place.cpp
+++ b/plugins/place/src/place.cpp
@@ -590,6 +590,11 @@ PlaceWindow::doValidateResizeRequest (unsigned int &mask,
top += window->input ().top;
bottom -= window->input ().bottom + 2 * window->serverGeometry ().border ();
+ /* always validate position if the applicaiton changed only its size,
+ * as it might become partially offscreen because of that */
+ if (!(mask) & (CWX | CWY) && (mask & (CWWidth | CWHeight)))
+ sizeOnly = false;
+
if ((right - left) != xwc->width)
{
xwc->width = right - left;