diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 4e9b435cee..9446fc8951 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,13 +1,9 @@ set(kwin_xml ${CMAKE_SOURCE_DIR}/workspace/kwin/org.kde.KWin.xml) -set(interface_file) - -QT4_ADD_DBUS_INTERFACE( interface_file ${kwin_xml} kwin_interface ) - ########### next target ############### -set(kwin_update_window_settings_SRCS update_window_settings.cpp ${interface_file}) +set(kwin_update_window_settings_SRCS update_window_settings.cpp ) kde4_automoc(${kwin_update_window_settings_SRCS}) @@ -20,7 +16,7 @@ install(TARGETS kwin_update_window_settings DESTINATION ${LIB_INSTALL_DIR}/kconf ########### next target ############### -set(kwin_update_default_rules_SRCS update_default_rules.cpp ${interface_file}) +set(kwin_update_default_rules_SRCS update_default_rules.cpp) kde4_automoc(${kwin_update_default_rules}) diff --git a/data/update_default_rules.cpp b/data/update_default_rules.cpp index 3c74223bb6..0725ee52d7 100644 --- a/data/update_default_rules.cpp +++ b/data/update_default_rules.cpp @@ -15,7 +15,6 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include -#include int main( int argc, char* argv[] ) { @@ -51,10 +50,9 @@ int main( int argc, char* argv[] ) dest_cfg.writeEntry( "count", pos ); src_cfg.sync(); dest_cfg.sync(); -#ifdef __GNUC__ -#warning D-BUS TODO -// kwin* , and an attach to dbus is missing as well -#endif - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); + } diff --git a/data/update_window_settings.cpp b/data/update_window_settings.cpp index 8ada432af6..25685776b6 100644 --- a/data/update_window_settings.cpp +++ b/data/update_window_settings.cpp @@ -17,7 +17,6 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include -#include struct SessionInfo { QByteArray sessionId; @@ -167,10 +166,8 @@ int main() writeRules( dest_cfg ); src_cfg.sync(); dest_cfg.sync(); -#ifdef __GNUC__ -#warning D-BUS TODO -// kwin* , and an attach to dbus is missing as well -#endif - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); } diff --git a/kcmkwin/kwindecoration/CMakeLists.txt b/kcmkwin/kwindecoration/CMakeLists.txt index 2bed465fa3..dee3d5cc88 100644 --- a/kcmkwin/kwindecoration/CMakeLists.txt +++ b/kcmkwin/kwindecoration/CMakeLists.txt @@ -5,10 +5,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/workspace/kwin/lib ) set(kcm_kwindecoration_PART_SRCS kwindecoration.cpp buttons.cpp preview.cpp ) -set(kwin_xml ${CMAKE_SOURCE_DIR}/workspace/kwin/org.kde.KWin.xml) - -QT4_ADD_DBUS_INTERFACE( kcm_kwindecoration_PART_SRCS ${kwin_xml} kwin_interface ) - kde4_automoc(${kcm_kwindecoration_PART_SRCS}) diff --git a/kcmkwin/kwindecoration/kwindecoration.cpp b/kcmkwin/kwindecoration/kwindecoration.cpp index 6c82c9c51c..779af351fc 100644 --- a/kcmkwin/kwindecoration/kwindecoration.cpp +++ b/kcmkwin/kwindecoration/kwindecoration.cpp @@ -62,7 +62,6 @@ #include #include #include -#include // KCModule plugin interface // ========================= @@ -532,8 +531,11 @@ void KWinDecorationModule::save() emit pluginSave( kwinConfig ); kwinConfig.sync(); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); + } diff --git a/kcmkwin/kwinoptions/CMakeLists.txt b/kcmkwin/kwinoptions/CMakeLists.txt index 4b7ea6e1ce..702a8b90b1 100644 --- a/kcmkwin/kwinoptions/CMakeLists.txt +++ b/kcmkwin/kwinoptions/CMakeLists.txt @@ -5,9 +5,6 @@ set(kcm_kwinoptions_PART_SRCS windows.cpp mouse.cpp main.cpp ) -set(kwin_xml ${CMAKE_SOURCE_DIR}/workspace/kwin/org.kde.KWin.xml) - -QT4_ADD_DBUS_INTERFACE( kcm_kwinoptions_PART_SRCS ${kwin_xml} kwin_interface ) kde4_automoc(${kcm_kwinoptions_PART_SRCS}) diff --git a/kcmkwin/kwinoptions/main.cpp b/kcmkwin/kwinoptions/main.cpp index 4cbf308323..a696c472f8 100644 --- a/kcmkwin/kwinoptions/main.cpp +++ b/kcmkwin/kwinoptions/main.cpp @@ -33,7 +33,6 @@ #include "mouse.h" #include "windows.h" -#include "kwin_interface.h" #include "main.h" static KComponentData *_kcmkwm = 0; @@ -180,12 +179,12 @@ void KWinOptions::save() emit KCModule::changed( false ); // Send signal to kwin mConfig->sync(); -#ifdef __GNUC__ -#warning D-BUS TODO -// All these calls in kcmkwin modules should be actually kwin*, because of multihead. -#endif - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); + + } @@ -260,8 +259,11 @@ void KActionsOptions::save() emit KCModule::changed( false ); // Send signal to kwin mConfig->sync(); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); + } diff --git a/kcmkwin/kwinoptions/mouse.cpp b/kcmkwin/kwinoptions/mouse.cpp index b4dd89e77e..20f9472e1f 100644 --- a/kcmkwin/kwinoptions/mouse.cpp +++ b/kcmkwin/kwinoptions/mouse.cpp @@ -47,7 +47,6 @@ #include "mouse.h" #include "mouse.moc" -#include "kwin_interface.h" namespace { @@ -571,8 +570,11 @@ void KTitleBarActionsConfig::save() if (standAlone) { config->sync(); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); + } } @@ -847,8 +849,10 @@ void KWindowActionsConfig::save() if (standAlone) { config->sync(); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); } } diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp index be822cb744..9e5b43fe47 100644 --- a/kcmkwin/kwinoptions/windows.cpp +++ b/kcmkwin/kwinoptions/windows.cpp @@ -55,7 +55,6 @@ #include #include "windows.h" -#include "kwin_interface.h" // kwin config keywords #define KWIN_FOCUS "FocusPolicy" @@ -492,8 +491,10 @@ void KFocusConfig::save( void ) if (standAlone) { config->sync(); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); } emit KCModule::changed(false); } @@ -719,8 +720,11 @@ void KAdvancedConfig::save( void ) if (standAlone) { config->sync(); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); + } emit KCModule::changed(false); } @@ -1183,8 +1187,10 @@ void KMovingConfig::save( void ) if (standAlone) { config->sync(); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); } emit KCModule::changed(false); } @@ -1587,8 +1593,11 @@ void KTranslucencyConfig::save( void ) if (standAlone) { config->sync(); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); + } emit KCModule::changed(false); } diff --git a/kcmkwin/kwinrules/CMakeLists.txt b/kcmkwin/kwinrules/CMakeLists.txt index e39d743614..c7a819a912 100644 --- a/kcmkwin/kwinrules/CMakeLists.txt +++ b/kcmkwin/kwinrules/CMakeLists.txt @@ -8,10 +8,6 @@ ADD_DEFINITIONS(-DKCMRULES) set(kwinrules_SRCS ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp) -set(kwin_xml ${CMAKE_SOURCE_DIR}/workspace/kwin/org.kde.KWin.xml) - -QT4_ADD_DBUS_INTERFACE( kwinrules_SRCS ${kwin_xml} kwin_interface ) - kde4_add_ui_files(kwinrules_SRCS ruleslistbase.ui detectwidgetbase.ui) kde4_add_ui3_files(kwinrules_SRCS ruleswidgetbase.ui editshortcutbase.ui ) diff --git a/kcmkwin/kwinrules/kcm.cpp b/kcmkwin/kwinrules/kcm.cpp index 6178ef0c2d..135f527b5a 100644 --- a/kcmkwin/kwinrules/kcm.cpp +++ b/kcmkwin/kwinrules/kcm.cpp @@ -29,7 +29,6 @@ #include #include "ruleslist.h" -#include "kwin_interface.h" typedef KGenericFactory KCMRulesFactory; K_EXPORT_COMPONENT_FACTORY(kwinrules, KCMRulesFactory("kcmkwinrules")) @@ -65,8 +64,11 @@ void KCMRules::save() emit KCModule::changed( false ); // Send signal to kwin config.sync(); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); + } void KCMRules::defaults() diff --git a/kcmkwin/kwinrules/main.cpp b/kcmkwin/kwinrules/main.cpp index 48679fa644..3cc98a478b 100644 --- a/kcmkwin/kwinrules/main.cpp +++ b/kcmkwin/kwinrules/main.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include @@ -256,8 +255,10 @@ static int edit( Window wid, bool whole_app ) delete orig_rule; } saveRules( rules ); - org::kde::KWin kwin("org.kde.kwin", "/KWin", QDBusConnection::sessionBus()); - kwin.reconfigure(); + // Send signal to all kwin instances + QDBusMessage message = + QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); + QDBusConnection::sessionBus().send(message); return 0; } diff --git a/workspace.cpp b/workspace.cpp index 040ff32654..b4951ceb52 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -134,7 +134,6 @@ Workspace::Workspace( bool restore ) QDBusConnection dbus = QDBusConnection::sessionBus(); dbus.registerObject("/KWin", this); dbus.connect(QString(), "/KWin", "org.kde.KWin", "reloadConfig", this, SLOT(slotReloadConfig())); - _self = this; mgr = new PluginMgr; root = rootWindow();