diff --git a/CMakeLists.txt b/CMakeLists.txt index 65b2ee50a4..e6039081d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,18 +8,13 @@ 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 ############### set(kwin_KDEINIT_SRCS - kwinadaptor.cpp workspace.cpp client.cpp placement.cpp @@ -42,100 +37,27 @@ 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 ) -kde4_automoc(kwin ${kwin_KDEINIT_SRCS}) +qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWinInternal::Workspace ) + +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/kwinadaptor.cpp b/kwinadaptor.cpp deleted file mode 100644 index 409c958c72..0000000000 --- a/kwinadaptor.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -c KWinAdaptor -m -p kwinadaptor -- org.kde.KWin.xml - * - * dbusxml2cpp is Copyright (C) 2006 Trolltech AS. All rights reserved. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "kwinadaptor.h" - -/* - * Implementation of interface class KWinAdaptor - */ - -KWinAdaptor::KWinAdaptor(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) -{ -} - -KWinAdaptor::~KWinAdaptor() -{ -} - - -#include "kwinadaptor.moc" diff --git a/kwinadaptor.h b/kwinadaptor.h deleted file mode 100644 index 91e805c40d..0000000000 --- a/kwinadaptor.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -c KWinAdaptor -m -p kwinadaptor -- org.kde.KWin.xml - * - * dbusxml2cpp is Copyright (C) 2006 Trolltech AS. All rights reserved. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef KWINADAPTOR_H_276481152054086 -#define KWINADAPTOR_H_276481152054086 - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Proxy class for interface org.kde.KWin - */ -class KWinAdaptor: public QDBusAbstractInterface -{ - Q_OBJECT -public: - static inline const char *staticInterfaceName() - { return "org.kde.KWin"; } - -public: - KWinAdaptor(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~KWinAdaptor(); - -public Q_SLOTS: // METHODS - inline Q_NOREPLY void cascadeDesktop() - { - QList argumentList; - callWithArgumentList(QDBus::NoBlock, QLatin1String("cascadeDesktop"), argumentList); - } - - inline QDBusReply circulateDesktopApplications() - { - QList argumentList; - return callWithArgumentList(QDBus::Block, QLatin1String("circulateDesktopApplications"), argumentList); - } - - inline QDBusReply currentDesktop() - { - QList argumentList; - return callWithArgumentList(QDBus::Block, QLatin1String("currentDesktop"), argumentList); - } - - inline QDBusReply doNotManage(const QString &name) - { - QList argumentList; - argumentList << qVariantFromValue(name); - return callWithArgumentList(QDBus::Block, QLatin1String("doNotManage"), argumentList); - } - - inline Q_NOREPLY void killWindow() - { - QList argumentList; - callWithArgumentList(QDBus::NoBlock, QLatin1String("killWindow"), argumentList); - } - - inline QDBusReply nextDesktop() - { - QList argumentList; - return callWithArgumentList(QDBus::Block, QLatin1String("nextDesktop"), argumentList); - } - - inline QDBusReply previousDesktop() - { - QList argumentList; - return callWithArgumentList(QDBus::Block, QLatin1String("previousDesktop"), argumentList); - } - - inline Q_NOREPLY void reconfigure() - { - QList argumentList; - callWithArgumentList(QDBus::NoBlock, QLatin1String("reconfigure"), argumentList); - } - - inline QDBusReply refresh() - { - QList argumentList; - return callWithArgumentList(QDBus::Block, QLatin1String("refresh"), argumentList); - } - - inline QDBusReply setCurrentDesktop(int desktop) - { - QList argumentList; - argumentList << qVariantFromValue(desktop); - return callWithArgumentList(QDBus::Block, QLatin1String("setCurrentDesktop"), argumentList); - } - - inline QDBusReply setDesktopLayout(int orientation, int x, int y) - { - QList argumentList; - argumentList << qVariantFromValue(orientation) << qVariantFromValue(x) << qVariantFromValue(y); - return callWithArgumentList(QDBus::Block, QLatin1String("setDesktopLayout"), argumentList); - } - - inline QDBusReply showWindowMenuAt(qlonglong winId, int x, int y) - { - QList argumentList; - argumentList << qVariantFromValue(winId) << qVariantFromValue(x) << qVariantFromValue(y); - return callWithArgumentList(QDBus::Block, QLatin1String("showWindowMenuAt"), argumentList); - } - - inline Q_NOREPLY void unclutterDesktop() - { - QList argumentList; - callWithArgumentList(QDBus::NoBlock, QLatin1String("unclutterDesktop"), argumentList); - } - -Q_SIGNALS: // SIGNALS -}; - -namespace org { - namespace kde { - typedef ::KWinAdaptor KWin; - } -} -#endif diff --git a/workspace.cpp b/workspace.cpp index 1a4cba336d..3d002fff01 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -124,7 +124,8 @@ Workspace::Workspace( bool restore ) block_stacking_updates( 0 ), forced_global_mouse_grab( false ) { - new KWinAdaptor( "org.kde.kwin", "/KWin", QDBusConnection::sessionBus(), this ); + (void) new KWinAdaptor( this ); + QDBusConnection::sessionBus().registerObject("/KWin", this); _self = this; mgr = new PluginMgr;