diff --git a/events.cpp b/events.cpp index d3a0f3a24f..e964f2ab78 100644 --- a/events.cpp +++ b/events.cpp @@ -1014,7 +1014,7 @@ void Client::updateMouseGrab() grabButton(XCB_NONE); return; } - if (isActive() && !workspace()->forcedGlobalMouseGrab()) { // see Workspace::establishTabBoxGrab() + if (isActive() && !TabBox::TabBox::self()->forcedGlobalMouseGrab()) { // see TabBox::establishTabBoxGrab() // first grab all modifier combinations m_wrapper.grabButton(XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC); // remove the grab for no modifiers only if the window diff --git a/tabbox/tabbox.h b/tabbox/tabbox.h index 90418f4ee0..c104c397a3 100644 --- a/tabbox/tabbox.h +++ b/tabbox/tabbox.h @@ -176,6 +176,10 @@ public: void keyPress(int key); void keyRelease(const xcb_key_release_event_t *ev); + bool forcedGlobalMouseGrab() const { + return m_forcedGlobalMouseGrab; + } + static TabBox *self(); static TabBox *create(QObject *parent); diff --git a/workspace.cpp b/workspace.cpp index 200edb5079..9e9fdbf0a1 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -132,7 +132,6 @@ Workspace::Workspace(bool restore) , startup(0) , set_active_client_recursion(0) , block_stacking_updates(0) - , forced_global_mouse_grab(false) { // If KWin was already running it saved its configuration after loosing the selection -> Reread QFuture reparseConfigFuture = QtConcurrent::run(options, &Options::reparseConfiguration); diff --git a/workspace.h b/workspace.h index 71c328e4f4..6c76006a3e 100644 --- a/workspace.h +++ b/workspace.h @@ -297,7 +297,6 @@ public: void focusToNull(); // SELI TODO: Public? - bool forcedGlobalMouseGrab() const; void clientShortcutUpdated(Client* c); bool shortcutAvailable(const QKeySequence &cut, Client* ignore = NULL) const; bool globalShortcutsDisabled() const; @@ -570,7 +569,6 @@ private: int block_stacking_updates; // When > 0, stacking updates are temporarily disabled bool blocked_propagating_new_clients; // Propagate also new clients after enabling stacking updates? QScopedPointer m_nullFocus; - bool forced_global_mouse_grab; friend class StackingUpdatesBlocker; QScopedPointer m_windowKiller; @@ -666,11 +664,6 @@ inline bool Workspace::sessionSaving() const return session_saving; } -inline bool Workspace::forcedGlobalMouseGrab() const -{ - return forced_global_mouse_grab; -} - inline bool Workspace::showingDesktop() const { return showing_desktop;