diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48d3604659..05281681b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,7 @@ kde4_automoc(${kwin_KDEINIT_SRCS})
kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
-target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} kdecorations DCOP ${X11_LIBRARIES} ${QT_QT3SUPPORT_LIBRARY} )
+target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} kdecorations ${X11_LIBRARIES} ${QT_QT3SUPPORT_LIBRARY} )
install_targets(${LIB_INSTALL_DIR} kdeinit_kwin )
diff --git a/data/update_default_rules.cpp b/data/update_default_rules.cpp
index 11190cbbb7..1eb9cb5b03 100644
--- a/data/update_default_rules.cpp
+++ b/data/update_default_rules.cpp
@@ -10,11 +10,11 @@ License. See the file "COPYING" for the exact licensing terms.
// read addtional window rules and add them to kwinrulesrc
-#include
#include
#include
#include
#include
+#include
int main( int argc, char* argv[] )
{
@@ -50,7 +50,10 @@ int main( int argc, char* argv[] )
dest_cfg.writeEntry( "count", pos );
src_cfg.sync();
dest_cfg.sync();
- DCOPClient client;
- client.attach();
- client.send("kwin*", "", "reconfigure()", QByteArray());
+#ifdef __GNUC__
+#warning D-BUS TODO
+// kwin* , and an attach to dbus is missing as well
+#endif
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
diff --git a/data/update_window_settings.cpp b/data/update_window_settings.cpp
index b4b1baa9fd..5ad266425f 100644
--- a/data/update_window_settings.cpp
+++ b/data/update_window_settings.cpp
@@ -13,11 +13,11 @@ License. See the file "COPYING" for the exact licensing terms.
#include
#include
#include
-#include
#include
//Added by qt3to4:
#include
#include
+#include
struct SessionInfo
{
@@ -166,7 +166,10 @@ int main()
writeRules( dest_cfg );
src_cfg.sync();
dest_cfg.sync();
- DCOPClient client;
- client.attach();
- client.send("kwin*", "", "reconfigure()", QByteArray());
+#ifdef __GNUC__
+#warning D-BUS TODO
+// kwin* , and an attach to dbus is missing as well
+#endif
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
diff --git a/kcmkwin/kwindecoration/CMakeLists.txt b/kcmkwin/kwindecoration/CMakeLists.txt
index 3e61d3eba8..e013792b7b 100644
--- a/kcmkwin/kwindecoration/CMakeLists.txt
+++ b/kcmkwin/kwindecoration/CMakeLists.txt
@@ -12,7 +12,7 @@ kde4_add_plugin(kcm_kwindecoration ${kcm_kwindecoration_PART_SRCS})
kde4_install_libtool_file( ${PLUGIN_INSTALL_DIR} kcm_kwindecoration )
-target_link_libraries(kcm_kwindecoration ${KDE4_KDEUI_LIBS} kdecorations DCOP ${QT_QT3SUPPORT_LIBRARY} ${X11_LIBRARIES})
+target_link_libraries(kcm_kwindecoration ${KDE4_KDEUI_LIBS} kdecorations ${QT_QT3SUPPORT_LIBRARY} ${X11_LIBRARIES})
install_targets(${PLUGIN_INSTALL_DIR} kcm_kwindecoration )
diff --git a/kcmkwin/kwindecoration/kwindecoration.cpp b/kcmkwin/kwindecoration/kwindecoration.cpp
index 96dc769388..ee3e9da30b 100644
--- a/kcmkwin/kwindecoration/kwindecoration.cpp
+++ b/kcmkwin/kwindecoration/kwindecoration.cpp
@@ -44,6 +44,8 @@
#include
#include
+#include
+
#include
#include
#include
@@ -192,9 +194,6 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const QStringList &)
connect( cBorder, SIGNAL( activated( int )), SLOT( slotBorderChanged( int )));
// connect( cbUseMiniWindows, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
- // Allow kwin dcop signal to update our selection list
- connectDCOPSignal("kwin", 0, "dcopResetAllClients()", "dcopUpdateClientList()", false);
-
KAboutData *about =
new KAboutData(I18N_NOOP("kcmkwindecoration"),
I18N_NOOP("Window Decoration Control Module"),
@@ -514,18 +513,6 @@ void KWinDecorationModule::writeConfig( KConfig* conf )
}
-void KWinDecorationModule::dcopUpdateClientList()
-{
- // Changes the current active ListBox item, and
- // Loads a new plugin configuration tab if required.
- KConfig kwinConfig("kwinrc");
- kwinConfig.setGroup("Style");
-
- readConfig( &kwinConfig );
- resetPlugin( &kwinConfig );
-}
-
-
// Virutal functions required by KCModule
void KWinDecorationModule::load()
{
@@ -547,8 +534,8 @@ void KWinDecorationModule::save()
emit pluginSave( &kwinConfig );
kwinConfig.sync();
- resetKWin();
- // resetPlugin() will get called via the above DCOP function
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
@@ -615,18 +602,6 @@ QString KWinDecorationModule::quickHelp() const
" In the \"Buttons\" tab you can change the positions of the buttons to your liking.
" );
}
-
-void KWinDecorationModule::resetKWin()
-{
-#warning "kde4: port it to dbus call kwin*"
-#if 0
- bool ok = kapp->dcopClient()->send("kwin*", "KWinInterface",
- "reconfigure()", QByteArray());
- if (!ok)
- kDebug() << "kcmkwindecoration: Could not reconfigure kwin" << endl;
-#endif
-}
-
#include "kwindecoration.moc"
// vim: ts=4
// kate: space-indent off; tab-width 4;
diff --git a/kcmkwin/kwindecoration/kwindecoration.h b/kcmkwin/kwindecoration/kwindecoration.h
index a6fc27b26f..436c8bcfc0 100644
--- a/kcmkwin/kwindecoration/kwindecoration.h
+++ b/kcmkwin/kwindecoration/kwindecoration.h
@@ -31,7 +31,6 @@
#define KWINDECORATION_H
#include
-#include
#include "buttons.h"
#include
#include
@@ -74,8 +73,6 @@ class KWinDecorationModule : public KCModule, public KDecorationDefines
QString quickHelp() const;
- virtual void dcopUpdateClientList();
-
signals:
void pluginLoad( KConfig* conf );
void pluginSave( KConfig* conf );
@@ -98,7 +95,6 @@ class KWinDecorationModule : public KCModule, public KDecorationDefines
QString decorationName ( QString& libName );
static QString styleToConfigLib( QString& styleLib );
void resetPlugin( KConfig* conf, const QString& currentDecoName = QString() );
- void resetKWin();
void checkSupportedBorderSizes();
static int borderSizeToIndex( BorderSize size, QList< BorderSize > sizes );
static BorderSize indexToBorderSize( int index, QList< BorderSize > sizes );
diff --git a/kcmkwin/kwinoptions/CMakeLists.txt b/kcmkwin/kwinoptions/CMakeLists.txt
index 6def46c357..d5e407bfc8 100644
--- a/kcmkwin/kwinoptions/CMakeLists.txt
+++ b/kcmkwin/kwinoptions/CMakeLists.txt
@@ -11,7 +11,7 @@ kde4_add_plugin(kcm_kwinoptions ${kcm_kwinoptions_PART_SRCS})
kde4_install_libtool_file( ${PLUGIN_INSTALL_DIR} kcm_kwinoptions )
-target_link_libraries(kcm_kwinoptions ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} DCOP ${QT_QT3SUPPORT_LIBRARY})
+target_link_libraries(kcm_kwinoptions ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} ${QT_QT3SUPPORT_LIBRARY})
install_targets(${PLUGIN_INSTALL_DIR} kcm_kwinoptions )
diff --git a/kcmkwin/kwinoptions/main.cpp b/kcmkwin/kwinoptions/main.cpp
index 4aab4d8641..cf2a5faf7b 100644
--- a/kcmkwin/kwinoptions/main.cpp
+++ b/kcmkwin/kwinoptions/main.cpp
@@ -21,7 +21,7 @@
//Added by qt3to4:
#include
-#include
+#include
#include
#include
@@ -175,9 +175,12 @@ void KWinOptions::save()
emit KCModule::changed( false );
// Send signal to kwin
mConfig->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+#ifdef __GNUC__
+#warning D-BUS TODO
+// All these calls in kcmkwin modules should be actually kwin*, because of multihead.
+#endif
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
@@ -250,9 +253,8 @@ void KActionsOptions::save()
emit KCModule::changed( false );
// Send signal to kwin
mConfig->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
diff --git a/kcmkwin/kwinoptions/mouse.cpp b/kcmkwin/kwinoptions/mouse.cpp
index d00c349e9d..f36ab5f526 100644
--- a/kcmkwin/kwinoptions/mouse.cpp
+++ b/kcmkwin/kwinoptions/mouse.cpp
@@ -31,13 +31,13 @@
#include
#include
-#include
#include
#include
#include
#include
#include
#include
+#include
#include
#include
@@ -571,9 +571,8 @@ void KTitleBarActionsConfig::save()
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
}
@@ -848,9 +847,8 @@ void KWindowActionsConfig::save()
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
}
diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp
index 63f0c980ee..9ffcd661b2 100644
--- a/kcmkwin/kwinoptions/windows.cpp
+++ b/kcmkwin/kwinoptions/windows.cpp
@@ -46,10 +46,10 @@
#include
#include
#include
-#include
#include
#include
#include
+#include
#include
#include
@@ -497,9 +497,8 @@ void KFocusConfig::save( void )
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
emit KCModule::changed(false);
}
@@ -725,9 +724,8 @@ void KAdvancedConfig::save( void )
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
emit KCModule::changed(false);
}
@@ -1190,9 +1188,8 @@ void KMovingConfig::save( void )
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
emit KCModule::changed(false);
}
@@ -1594,9 +1591,8 @@ void KTranslucencyConfig::save( void )
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
emit KCModule::changed(false);
}
diff --git a/kcmkwin/kwinrules/kcm.cpp b/kcmkwin/kwinrules/kcm.cpp
index 85c41314e4..82d40cb319 100644
--- a/kcmkwin/kwinrules/kcm.cpp
+++ b/kcmkwin/kwinrules/kcm.cpp
@@ -24,8 +24,8 @@
#include
#include
#include
-#include
#include
+#include
#include "ruleslist.h"
@@ -67,9 +67,8 @@ void KCMRules::save()
emit KCModule::changed( false );
// Send signal to kwin
config.sync();
- if( !kapp->dcopClient()->isAttached())
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
}
void KCMRules::defaults()
diff --git a/kcmkwin/kwinrules/main.cpp b/kcmkwin/kwinrules/main.cpp
index fe4866fecd..171c19af14 100644
--- a/kcmkwin/kwinrules/main.cpp
+++ b/kcmkwin/kwinrules/main.cpp
@@ -18,10 +18,10 @@
#include
#include
-#include
#include
#include
#include
+#include
#include
#include
@@ -257,9 +257,8 @@ static int edit( Window wid, bool whole_app )
delete orig_rule;
}
saveRules( rules );
- if( !kapp->dcopClient()->isAttached())
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("kwin*", "", "reconfigure()", QByteArray());
+ QDBusInterfacePtr kwin( "org.kde.kwin", "/kwin", "org.kde.KWin" );
+ kwin->call( "reconfigure" );
return 0;
}
diff --git a/main.cpp b/main.cpp
index dd26923009..d2ad3feb35 100644
--- a/main.cpp
+++ b/main.cpp
@@ -18,12 +18,13 @@ License. See the file "COPYING" for the exact licensing terms.
#include
#include
#include
-#include
#include
#include
#include
#include
#include
+#include
+#include
#include "atoms.h"
#include "options.h"
@@ -122,8 +123,9 @@ Application::Application( )
syncX(); // trigger possible errors, there's still a chance to abort
initting = false; // startup done, we are up and running now.
-
- dcopClient()->send( "ksplash", "", "upAndRunning(QString)", QString("wm started"));
+
+ QDBusInterfacePtr ksplash( "org.kde.ksplash", "/ksplash", "org.kde.KSplash" );
+ ksplash->call( "upAndRunning", QString( "wm started" ));
XEvent e;
e.xclient.type = ClientMessage;
e.xclient.message_type = XInternAtom( QX11Info::display(), "_KDE_SPLASH_PROGRESS", False );
@@ -262,8 +264,10 @@ KDE_EXPORT int kdemain( int argc, char * argv[] )
signal(SIGINT, SIG_IGN);
if (signal(SIGHUP, KWinInternal::sighandler) == SIG_IGN)
signal(SIGHUP, SIG_IGN);
-
- KApplication::disableAutoDcopRegistration();
+#ifdef __GNUC__
+#warning D-BUS TODO
+// KApplication::disableAutoDcopRegistration();
+#endif
KWinInternal::Application a;
KWinInternal::SessionManaged weAreIndeed;
KWinInternal::SessionSaveDoneHelper helper;
@@ -276,9 +280,7 @@ KDE_EXPORT int kdemain( int argc, char * argv[] )
else
appname.sprintf("kwin-screen-%d", KWinInternal::screen_number);
- DCOPClient* client = a.dcopClient();
- client->registerAs( DCOPCString( appname.toAscii() ) , false);
- client->setDefaultObject( "KWinInterface" );
+ QDBus::sessionBus().busService()->requestName( appname, 0 );
return a.exec();
}
diff --git a/workspace.cpp b/workspace.cpp
index 49f5a8bb5d..7ae5fab87f 100644
--- a/workspace.cpp
+++ b/workspace.cpp
@@ -42,6 +42,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include "notifications.h"
#include "group.h"
#include "rules.h"
+#include "kwinadaptor.h"
#include
#include
@@ -128,7 +129,7 @@ Workspace::Workspace( bool restore )
forced_global_mouse_grab( false )
{
new KWinAdaptor(this);
- QDBus::sessionBus().registerObject("/KWinInterface", this);
+ QDBus::sessionBus().registerObject("/KWin", this);
setObjectName( "workspace" );
_self = this;
@@ -2438,7 +2439,10 @@ void Workspace::startKompmgr()
QByteArray ba;
QDataStream arg(&ba, QIODevice::WriteOnly);
arg << "";
- kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStarted()", ba);
+#ifdef __GNUC__
+#warning D-BUS TODO
+// kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStarted()", ba);
+#endif
}
if (popup){ delete popup; popup = 0L; } // to add/remove opacity slider
}
@@ -2454,7 +2458,10 @@ void Workspace::stopKompmgr()
QByteArray ba;
QDataStream arg(&ba, QIODevice::WriteOnly);
arg << "";
- kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStopped()", ba);
+#ifdef __GNUC__
+#warning D-BUS TODO
+// kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStopped()", ba);
+#endif
}
bool Workspace::kompmgrIsRunning()