summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-07 23:28:39 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-07 23:28:39 +0800
commitfac5ee5fc46909933e9cb6be5475341e90301fe8 (patch)
treef8f532fecd241b1a521c68036e6de95c7ae68ec2
parentff16ed819390d058fae88975dcbb276cb4c8f277 (diff)
downloadcompiz-with-glib-mainloop-fac5ee5fc46909933e9cb6be5475341e90301fe8.tar.gz
compiz-with-glib-mainloop-fac5ee5fc46909933e9cb6be5475341e90301fe8.tar.bz2
Also handle windows that have a server border set in pointer placement mode.
Also fix typo. Forward port 1d5f80cd52274484ecb59a1c8f7e7b6cea3b1844 to master
-rw-r--r--plugins/place/src/place.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/place/src/place.cpp b/plugins/place/src/place.cpp
index 680893c..9f1b2c6 100644
--- a/plugins/place/src/place.cpp
+++ b/plugins/place/src/place.cpp
@@ -889,8 +889,11 @@ PlaceWindow::placePointer (const CompRect &workArea,
{
if (PlaceScreen::get (screen)->getPointerPosition (pos))
{
- pos -= CompPoint (window->serverGeometry ().height () / 2,
- window->serverGeometry ().width () / 2);
+ unsigned int dx = (window->serverGeometry ().width () / 2) -
+ window->serverGeometry ().border ();
+ unsigned int dy = (window->serverGeometry ().height () / 2) -
+ window->serverGeometry ().border ();
+ pos -= CompPoint (dx, dy);
}
else
placeCentered (workArea, pos);