diff --git a/workspace.cpp b/workspace.cpp index 5432b53829..5b8ccd25ca 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -28,7 +28,6 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include -#include #include #include #include @@ -52,6 +51,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include +#include namespace KWinInternal { @@ -319,11 +319,12 @@ void Workspace::init() SLOT(slotReconfigure())); connect( &updateToolWindowsTimer, SIGNAL( timeout()), this, SLOT( slotUpdateToolWindows())); - connect(kapp, SIGNAL(appearanceChanged()), this, + connect(KGlobalSettings::self(), SIGNAL(appearanceChanged()), this, SLOT(slotReconfigure())); - connect(kapp, SIGNAL(settingsChanged(int)), this, + connect(KGlobalSettings::self(), SIGNAL(settingsChanged(int)), this, SLOT(slotSettingsChanged(int))); - connect(kapp, SIGNAL( kipcMessage( int, int )), this, SLOT( kipcMessage( int, int ))); + connect(KGlobalSettings::self(), SIGNAL(blockShortcuts(int)), this, + SLOT(slotBlockShortcuts(int))); active_client = NULL; rootInfo->setActiveWindow( None ); @@ -856,7 +857,7 @@ void Workspace::reconfigure() void Workspace::slotSettingsChanged(int category) { kDebug(1212) << "Workspace::slotSettingsChanged()" << endl; - if( category == (int) KApplication::SETTINGS_SHORTCUTS ) + if( category == KGlobalSettings::SETTINGS_SHORTCUTS ) readShortcuts(); } @@ -2466,21 +2467,19 @@ void Workspace::disableGlobalShortcutsForClient( bool disable ) { if( disable ) pending_dfc = true; - KIPC::sendMessageAll( KIPC::BlockShortcuts, disable ); + KGlobalSettings::self()->emitChange( KGlobalSettings::BlockShortcuts, disable ); // kwin will get the kipc message too } } void Workspace::disableGlobalShortcuts( bool disable ) { - KIPC::sendMessageAll( KIPC::BlockShortcuts, disable ); + KGlobalSettings::self()->emitChange( KGlobalSettings::BlockShortcuts, disable ); // kwin will get the kipc message too } -void Workspace::kipcMessage( int id, int data ) +void Workspace::slotBlockShortcuts( int data ) { - if( id != KIPC::BlockShortcuts ) - return; if( pending_dfc && data ) { global_shortcuts_disabled_for_client = true; diff --git a/workspace.h b/workspace.h index ae6d4fc537..91ba1dbbaf 100644 --- a/workspace.h +++ b/workspace.h @@ -233,7 +233,7 @@ class Workspace : public QObject, public KDecorationDefines void sendPingToWindow( Window w, Time timestamp ); // called from Client::pingWindow() void sendTakeActivity( Client* c, Time timestamp, long flags ); // called from Client::takeActivity() - + // only called from Client::destroyClient() or Client::releaseWindow() void removeClient( Client*, allowed_t ); void setActiveClient( Client*, allowed_t ); @@ -247,7 +247,7 @@ class Workspace : public QObject, public KDecorationDefines void focusToNull(); // SELI public? enum FocusChainChange { FocusChainMakeFirst, FocusChainMakeLast, FocusChainUpdate }; void updateFocusChains( Client* c, FocusChainChange change ); - + bool forcedGlobalMouseGrab() const; void clientShortcutUpdated( Client* c ); bool shortcutAvailable( const KShortcut& cut, Client* ignore = NULL ) const; @@ -274,7 +274,7 @@ class Workspace : public QObject, public KDecorationDefines void cancelDelayFocus(); void requestDelayFocus( Client* ); - + void toggleTopDockShadows(bool on); public slots: @@ -390,7 +390,7 @@ class Workspace : public QObject, public KDecorationDefines void setupWindowShortcutDone( bool ); void updateClientArea(); - + private slots: void desktopPopupAboutToShow(); void clientPopupAboutToShow(); @@ -405,12 +405,12 @@ class Workspace : public QObject, public KDecorationDefines void gotTemporaryRulesMessage( const QString& ); void cleanupTemporaryRules(); void writeWindowRules(); - void kipcMessage( int id, int data ); + void slotBlockShortcuts(int data); // kompmgr void setPopupClientOpacity(int v); void resetClientOpacity(); void setTransButtonText(int value); - // end + // end protected: bool keyPressMouseEmulation( XKeyEvent& ev ); @@ -490,7 +490,7 @@ class Workspace : public QObject, public KDecorationDefines void raiseElectricBorders(); // ------------------ - + void helperDialog( const QString& message, const Client* c ); void calcDesktopLayout(int &x, int &y) const; @@ -542,7 +542,7 @@ class Workspace : public QObject, public KDecorationDefines ClientList global_focus_chain; // this one is only for things like tabbox's MRU ClientList should_get_focus; // last is most recent ClientList attention_chain; - + bool showing_desktop; ClientList showing_desktop_clients; int block_showing_desktop; @@ -654,7 +654,7 @@ class Workspace : public QObject, public KDecorationDefines Window null_focus_window; bool forced_global_mouse_grab; friend class StackingUpdatesBlocker; - + //kompmgr QSlider *transSlider; QPushButton *transButton;