From 150699179d1454087411ab0e621f8e0ba3fefd9e Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Thu, 21 Dec 2006 14:53:38 +0000 Subject: [PATCH] Use dbus interface svn path=/trunk/KDE/kdebase/workspace/; revision=615442 --- CMakeLists.txt | 96 ++++++-------------------------------------------- main.cpp | 6 ++-- 2 files changed, 14 insertions(+), 88 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cc256fd69..e2486b1a4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,13 +8,7 @@ add_subdirectory( pics ) add_subdirectory( clients ) add_subdirectory( data ) -include_directories( - ${CMAKE_CURRENT_BINARY_DIR}/lib - ${CMAKE_CURRENT_SOURCE_DIR}/lib - ${CMAKE_CURRENT_SOURCE_DIR}/effects - ) - - +include_directories( ${CMAKE_CURRENT_BINARY_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/lib ) ########### next target ############### @@ -41,102 +35,32 @@ set(kwin_KDEINIT_SRCS activation.cpp useractions.cpp geometry.cpp - rules.cpp - composite.cpp - toplevel.cpp - unmanaged.cpp - scene.cpp - scene_basic.cpp - scene_xrender.cpp - scene_opengl.cpp - glutils.cpp - effects.cpp - effects/fadein.cpp - effects/maketransparent.cpp - effects/scalein.cpp - effects/shakymove.cpp - effects/shiftworkspaceup.cpp - effects/howto.cpp - effects/dialogparent.cpp - effects/showfps.cpp - effects/zoom.cpp - ) + rules.cpp ) + +set(ksplash_xml ${CMAKE_SOURCE_DIR}/workspace/ksplashml/org.kde.KSplash.xml) + + +QT4_ADD_DBUS_INTERFACE( kwin_KDEINIT_SRCS ${ksplash_xml} ksplash_interface ) qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWinInternal::Workspace ) -kde4_automoc(kwin ${kwin_KDEINIT_SRCS}) +kde4_automoc(${kwin_KDEINIT_SRCS}) kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS}) target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} kdecorations ${X11_LIBRARIES} ${QT_QT3SUPPORT_LIBRARY} ) -target_link_libraries(kdeinit_kwin -lGL) -# -ldl used by OpenGL code -target_link_libraries(kdeinit_kwin -ldl) -if (X11_Xrandr_FOUND) - target_link_libraries(kdeinit_kwin ${X11_Xrandr_LIB}) -endif (X11_Xrandr_FOUND) -if (X11_Xcomposite_FOUND) - target_link_libraries(kdeinit_kwin ${X11_Xcomposite_LIB}) -endif (X11_Xcomposite_FOUND) -if (X11_Xdamage_FOUND) - target_link_libraries(kdeinit_kwin ${X11_Xdamage_LIB}) -endif (X11_Xdamage_FOUND) -if (X11_Xrender_FOUND) - target_link_libraries(kdeinit_kwin ${X11_Xrender_LIB}) -endif (X11_Xrender_FOUND) -if (X11_Xfixes_FOUND) - target_link_libraries(kdeinit_kwin ${X11_Xfixes_LIB}) -endif (X11_Xfixes_FOUND) install(TARGETS kdeinit_kwin DESTINATION ${LIB_INSTALL_DIR} ) target_link_libraries( kwin kdeinit_kwin ) -install(TARGETS kwin DESTINATION bin) +install(TARGETS kwin DESTINATION ${BIN_INSTALL_DIR}) ########### install files ############### install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) install( FILES eventsrc DESTINATION ${DATA_INSTALL_DIR}/kwin ) -kde4_install_icons( ${ICON_INSTALL_DIR} crystalsvg ) +kde4_install_icons( ${ICON_INSTALL_DIR} ) - - -#original Makefile.am contents follow: - -#INCLUDES = -I$(srcdir)/lib $(all_includes) -# -#SUBDIRS = lib . killer kcmkwin pics clients oldheaders data -# -#bin_PROGRAMS = -#lib_LTLIBRARIES = -#kdeinit_LTLIBRARIES = kwin.la -# -#kwin_la_SOURCES = workspace.cpp client.cpp placement.cpp atoms.cpp \ -# utils.cpp layers.cpp main.cpp popupinfo.cpp tabbox.cpp \ -# options.cpp plugins.cpp events.cpp KWinInterface.skel \ -# killwindow.cpp geometrytip.cpp sm.cpp group.cpp bridge.cpp \ -# manage.cpp notifications.cpp activation.cpp useractions.cpp \ -# geometry.cpp rules.cpp -# -#kwin_la_LIBADD = $(LIB_KDEUI) lib/libkdecorations.la -#kwin_la_LDFLAGS = $(all_libraries) -module -avoid-version -# -#include_HEADERS = KWinInterface.h -# -#KDE_ICON = kwin -# -#METASOURCES = AUTO -# -#messages: rc.cpp -# $(XGETTEXT) *.h *.cpp killer/*.cpp lib/*.cpp -o $(podir)/kwin.pot -# -#kwin_datadir = $(kde_datadir)/kwin -# -#kwin_data_DATA= eventsrc -# -#kde_kcfg_DATA = kwin.kcfg -# -#include ../../admin/Doxyfile.am diff --git a/main.cpp b/main.cpp index aeefeeaa2c..7b429ad77e 100644 --- a/main.cpp +++ b/main.cpp @@ -26,6 +26,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include +#include "ksplash_interface.h" #include "atoms.h" #include "options.h" @@ -126,8 +127,9 @@ Application::Application( ) initting = false; // startup done, we are up and running now. - QDBusInterface ksplash( "org.kde.ksplash", "/KSplash", "org.kde.KSplash" ); - ksplash.call( "upAndRunning", QString( "wm started" )); + org::kde::KSplash ksplash("org.kde.ksplash", "/KSplash", QDBusConnection::sessionBus()); + ksplash.upAndRunning(QString( "wm started" )); + XEvent e; e.xclient.type = ClientMessage; e.xclient.message_type = XInternAtom( display(), "_KDE_SPLASH_PROGRESS", False );