diff options
-rw-r--r-- | kde/window-decorator-kde4/decorator.cpp | 9 | ||||
-rw-r--r-- | kde/window-decorator-kde4/window.cpp | 2 | ||||
-rw-r--r-- | kde/window-decorator-kde4/window.h | 12 |
3 files changed, 23 insertions, 0 deletions
diff --git a/kde/window-decorator-kde4/decorator.cpp b/kde/window-decorator-kde4/decorator.cpp index 2672ef93..96b818df 100644 --- a/kde/window-decorator-kde4/decorator.cpp +++ b/kde/window-decorator-kde4/decorator.cpp @@ -603,8 +603,17 @@ KWD::Decorator::x11EventFilter (XEvent *xevent) xbe2.y = xbe->y - child->pos ().y (); } + client->setFakeRelease (false); QApplication::x11ProcessEvent ((XEvent *) &xbe2); + /* We won't get a button release event, because of the screengrabs + in compiz */ + if (client->getFakeRelease () && xevent->type == ButtonPress) + { + xbe2.type = ButtonRelease; + QApplication::x11ProcessEvent ((XEvent *) &xbe2); + } + return true; } } break; diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp index 086c40c1..c73f7711 100644 --- a/kde/window-decorator-kde4/window.cpp +++ b/kde/window-decorator-kde4/window.cpp @@ -1881,6 +1881,8 @@ KWD::Window::moveWindow (QMouseEvent *qme) qme->globalX (), qme->globalY (), direction); + mFakeRelease = true; + } #define OPACITY_STEP (0xffff / 10) diff --git a/kde/window-decorator-kde4/window.h b/kde/window-decorator-kde4/window.h index 485fe39b..0441fbb1 100644 --- a/kde/window-decorator-kde4/window.h +++ b/kde/window-decorator-kde4/window.h @@ -174,6 +174,17 @@ class Window:public QWidget, public KDecorationBridge { void showKillProcessDialog (Time timestamp); void hideKillProcessDialog (void); + void setFakeRelease (bool fakeRelease) + { + mFakeRelease = fakeRelease; + } + + bool getFakeRelease () + { + return mFakeRelease; + } + + private: void createDecoration (void); void updateShadow (void); @@ -240,6 +251,7 @@ class Window:public QWidget, public KDecorationBridge { QSize mSize; QProcess *mProcessKiller; KActionCollection mKeys; + bool mFakeRelease; QAction *mResizeOpAction; QAction *mMoveOpAction; |