summaryrefslogtreecommitdiff
path: root/kde
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2009-08-27 17:25:18 +0200
committerDennis kasprzyk <onestone@compiz-fusion.org>2009-08-27 17:25:18 +0200
commit18fbaa147412866d3d568b0ae08a21f2d8440306 (patch)
tree650549d004111aed2c7a292c8f2b614966fa0e2c /kde
parentf03d3057100193256aa83963081186bd153de64b (diff)
downloadzcomp-18fbaa147412866d3d568b0ae08a21f2d8440306.tar.gz
zcomp-18fbaa147412866d3d568b0ae08a21f2d8440306.tar.bz2
Fixed mouse wheel calculations by providing correct global position.
Diffstat (limited to 'kde')
-rw-r--r--kde/window-decorator-kde4/decorator.cpp4
-rw-r--r--kde/window-decorator-kde4/window.cpp8
2 files changed, 10 insertions, 2 deletions
diff --git a/kde/window-decorator-kde4/decorator.cpp b/kde/window-decorator-kde4/decorator.cpp
index ed7985d..67f4b13 100644
--- a/kde/window-decorator-kde4/decorator.cpp
+++ b/kde/window-decorator-kde4/decorator.cpp
@@ -523,6 +523,10 @@ KWD::Decorator::x11EventFilter (XEvent *xevent)
p = client->mapToChildAt (QPoint (xbe->x, xbe->y));
xbe2.x = p.x ();
xbe2.y = p.y ();
+
+ p = child->mapToGlobal(p);
+ xbe2.x_root = p.x ();
+ xbe2.y_root = p.y ();
client->setFakeRelease (false);
QApplication::x11ProcessEvent ((XEvent *) &xbe2);
diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp
index 5383e7b..d75a067 100644
--- a/kde/window-decorator-kde4/window.cpp
+++ b/kde/window-decorator-kde4/window.cpp
@@ -1504,6 +1504,9 @@ KWD::Window::moveWindow (QMouseEvent *qme)
NET::Direction direction;
direction = positionToDirection (mDecor->mousePosition (qme->pos ()));
+
+ QPoint p (mGeometry.x () - mExtents.left, mGeometry.y () - mExtents.top);
+ p += qme->pos ();
XUngrabPointer (QX11Info::display(), CurrentTime);
XUngrabKeyboard (QX11Info::display(), CurrentTime);
@@ -1511,9 +1514,10 @@ KWD::Window::moveWindow (QMouseEvent *qme)
Decorator::rootInfo ()->restackRequest (mClientId, NET::FromApplication,
None, Above,
QX11Info::appTime());
+
Decorator::rootInfo ()->moveResizeRequest (mClientId,
- qme->globalX (),
- qme->globalY (),
+ p.x (),
+ p.y (),
direction);
mFakeRelease = true;