Merge in compilation fixes from trunk.
svn path=/branches/work/kwin_composite/; revision=619536
This commit is contained in:
parent
9350d02134
commit
f52407b829
6 changed files with 185 additions and 26 deletions
|
@ -8,7 +8,13 @@ add_subdirectory( pics )
|
|||
add_subdirectory( clients )
|
||||
add_subdirectory( data )
|
||||
|
||||
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/lib )
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lib
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lib
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/effects
|
||||
)
|
||||
|
||||
|
||||
|
||||
########### next target ###############
|
||||
|
||||
|
@ -35,33 +41,102 @@ set(kwin_KDEINIT_SRCS
|
|||
activation.cpp
|
||||
useractions.cpp
|
||||
geometry.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 )
|
||||
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
|
||||
)
|
||||
|
||||
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWinInternal::Workspace )
|
||||
|
||||
kde4_automoc(${kwin_KDEINIT_SRCS})
|
||||
kde4_automoc(kwin ${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_DIR})
|
||||
install(TARGETS kwin DESTINATION bin)
|
||||
|
||||
########### install files ###############
|
||||
|
||||
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
|
||||
install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwin )
|
||||
install( FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_DIR} )
|
||||
|
||||
kde4_install_icons( ${ICON_INSTALL_DIR} )
|
||||
kde4_install_icons( ${ICON_INSTALL_DIR} crystalsvg )
|
||||
|
||||
|
||||
|
||||
|
||||
#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
|
||||
|
|
|
@ -29,6 +29,7 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
#include "atoms.h"
|
||||
#include "group.h"
|
||||
#include "rules.h"
|
||||
#include "effects.h"
|
||||
#include <QX11Info>
|
||||
|
||||
namespace KWinInternal
|
||||
|
@ -245,6 +246,8 @@ void Workspace::setActiveClient( Client* c, allowed_t )
|
|||
|
||||
rootInfo->setActiveWindow( active_client? active_client->window() : 0 );
|
||||
updateColormap();
|
||||
if( effects )
|
||||
effects->windowActivated( active_client );
|
||||
--set_active_client_recursion;
|
||||
}
|
||||
|
||||
|
@ -697,7 +700,7 @@ void Client::demandAttentionKNotify()
|
|||
}
|
||||
|
||||
// TODO I probably shouldn't be lazy here and do it without the macro, so that people can read it
|
||||
KWIN_COMPARE_PREDICATE( SameApplicationActiveHackPredicate, const Client*,
|
||||
KWIN_COMPARE_PREDICATE( SameApplicationActiveHackPredicate, Client, const Client*,
|
||||
// ignore already existing splashes, toolbars, utilities, menus and topmenus,
|
||||
// as the app may show those before the main window
|
||||
!cl->isSplash() && !cl->isToolbar() && !cl->isTopMenu() && !cl->isUtility() && !cl->isMenu()
|
||||
|
|
|
@ -6,18 +6,48 @@ include_directories( ${CMAKE_SOURCE_DIR}/workspace/kwin/lib )
|
|||
|
||||
########### next target ###############
|
||||
|
||||
set(kwin3_b2_PART_SRCS b2client.cpp)
|
||||
set(kwin3_b2_PART_SRCS b2client.cpp )
|
||||
|
||||
kde4_automoc(${kwin3_b2_PART_SRCS})
|
||||
kde4_automoc(kwin3_b2 ${kwin3_b2_PART_SRCS})
|
||||
|
||||
kde4_add_plugin(kwin3_b2 ${kwin3_b2_PART_SRCS})
|
||||
|
||||
kde4_install_libtool_file( ${PLUGIN_INSTALL_DIR} kwin3_b2 )
|
||||
|
||||
target_link_libraries(kwin3_b2 ${KDE4_KDEFX_LIBS} ${KDE4_KDEUI_LIBS} kdecorations ${QT_QT3SUPPORT_LIBRARY} ${X11_LIBRARIES} ${QT_QTGUI_LIBRARY})
|
||||
target_link_libraries(kwin3_b2 ${KDE4_KDEUI_LIBS} kdecorations kdefx ${QT_QT3SUPPORT_LIBRARY} ${X11_LIBRARIES} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
install(TARGETS kwin3_b2 DESTINATION ${PLUGIN_INSTALL_DIR})
|
||||
install(TARGETS kwin3_b2 DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||
|
||||
|
||||
########### install files ###############
|
||||
|
||||
install( FILES b2.desktop DESTINATION ${DATA_INSTALL_DIR}/kwin/ )
|
||||
|
||||
|
||||
|
||||
|
||||
#original Makefile.am contents follow:
|
||||
|
||||
#
|
||||
#INCLUDES = -I$(srcdir)/../../lib $(all_includes)
|
||||
#
|
||||
#SUBDIRS = . config
|
||||
#
|
||||
#kde_module_LTLIBRARIES = kwin3_b2.la
|
||||
#
|
||||
#kwin3_b2_la_SOURCES = b2client.cpp
|
||||
#kwin3_b2_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
|
||||
## kwin_b2_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_RPATH) $(KDE_MT_LDFLAGS)
|
||||
#kwin3_b2_la_LIBADD = ../../lib/libkdecorations.la -lkdefx
|
||||
#
|
||||
#METASOURCES = AUTO
|
||||
#noinst_HEADERS = b2client.h
|
||||
#
|
||||
#lnkdir = $(kde_datadir)/kwin/
|
||||
#lnk_DATA = b2.desktop
|
||||
#
|
||||
#EXTRA_DIST = $(lnk_DATA)
|
||||
#
|
||||
####KMAKE-start (don't edit or delete this block)
|
||||
#
|
||||
####KMAKE-end
|
||||
|
|
|
@ -10,7 +10,7 @@ set(kdecorations_LIB_SRCS
|
|||
kdecorationfactory.cpp
|
||||
kcommondecoration.cpp )
|
||||
|
||||
kde4_automoc(${kdecorations_LIB_SRCS})
|
||||
kde4_automoc(kdecorations ${kdecorations_LIB_SRCS})
|
||||
|
||||
kde4_add_library(kdecorations SHARED ${kdecorations_LIB_SRCS})
|
||||
|
||||
|
@ -22,4 +22,30 @@ install(TARGETS kdecorations DESTINATION ${LIB_INSTALL_DIR} )
|
|||
|
||||
########### install files ###############
|
||||
|
||||
install( FILES kdecoration.h kdecoration_p.h kdecoration_plugins_p.h kdecorationfactory.h kcommondecoration.h DESTINATION ${INCLUDE_INSTALL_DIR})
|
||||
install_files( /include FILES kdecoration.h kdecoration_p.h kdecoration_plugins_p.h kdecorationfactory.h kcommondecoration.h )
|
||||
|
||||
|
||||
|
||||
|
||||
#original Makefile.am contents follow:
|
||||
|
||||
## FRAME libkwin???
|
||||
#lib_LTLIBRARIES = libkdecorations.la
|
||||
#
|
||||
#libkdecorations_la_SOURCES = kdecoration.cpp kdecoration_p.cpp kdecoration_plugins_p.cpp \
|
||||
# kdecorationfactory.cpp kcommondecoration.cpp
|
||||
#libkdecorations_la_LIBADD = $(LIB_KDECORE)
|
||||
#libkdecorations_la_LDFLAGS = $(all_libraries) -version-info 1:0:0 -no-undefined
|
||||
#
|
||||
## FRAME
|
||||
#include_HEADERS = kdecoration.h kdecoration_p.h kdecoration_plugins_p.h \
|
||||
# kdecorationfactory.h kcommondecoration.h
|
||||
#
|
||||
#INCLUDES = $(all_includes)
|
||||
#METASOURCES = AUTO
|
||||
#
|
||||
#include ../../../admin/Doxyfile.am
|
||||
#
|
||||
#messages: rc.cpp
|
||||
# $(XGETTEXT) `find . -name \*.cpp` -o $(podir)/kwin_lib.pot
|
||||
# -rm rc.cpp
|
||||
|
|
17
main.cpp
17
main.cpp
|
@ -14,7 +14,6 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
|
||||
#include "main.h"
|
||||
|
||||
#include <kglobal.h>
|
||||
#include <klocale.h>
|
||||
#include <stdlib.h>
|
||||
#include <kcmdlineargs.h>
|
||||
|
@ -26,12 +25,13 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
#include <stdio.h>
|
||||
#include <fixx11h.h>
|
||||
#include <QtDBus/QtDBus>
|
||||
#include "ksplash_interface.h"
|
||||
#include <kglobal.h>
|
||||
|
||||
#include "atoms.h"
|
||||
#include "options.h"
|
||||
#include "sm.h"
|
||||
#include "utils.h"
|
||||
#include "effects.h"
|
||||
|
||||
#define INT8 _X11INT8
|
||||
#define INT32 _X11INT32
|
||||
|
@ -120,6 +120,8 @@ Application::Application( )
|
|||
options = new Options;
|
||||
atoms = new Atoms;
|
||||
|
||||
initting = false; // TODO
|
||||
|
||||
// create workspace.
|
||||
(void) new Workspace( isSessionRestored() );
|
||||
|
||||
|
@ -127,9 +129,8 @@ Application::Application( )
|
|||
|
||||
initting = false; // startup done, we are up and running now.
|
||||
|
||||
org::kde::KSplash ksplash("org.kde.ksplash", "/KSplash", QDBusConnection::sessionBus());
|
||||
ksplash.upAndRunning(QString( "wm started" ));
|
||||
|
||||
QDBusInterface 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( display(), "_KDE_SPLASH_PROGRESS", False );
|
||||
|
@ -146,6 +147,8 @@ Application::~Application()
|
|||
if( owner.ownerWindow() != None ) // if there was no --replace (no new WM)
|
||||
XSetInputFocus( display(), PointerRoot, RevertToPointerRoot, xTime() );
|
||||
delete options;
|
||||
delete effects;
|
||||
delete atoms;
|
||||
}
|
||||
|
||||
void Application::lostSelection()
|
||||
|
@ -280,9 +283,9 @@ KDE_EXPORT int kdemain( int argc, char * argv[] )
|
|||
|
||||
QString appname;
|
||||
if (KWinInternal::screen_number == 0)
|
||||
appname = "org.kde.kwin";
|
||||
appname = "kwin";
|
||||
else
|
||||
appname.sprintf("org.kde.kwin-screen-%d", KWinInternal::screen_number);
|
||||
appname.sprintf("kwin-screen-%d", KWinInternal::screen_number);
|
||||
|
||||
QDBusConnection::sessionBus().interface()->registerService( appname, QDBusConnectionInterface::DontQueueService );
|
||||
|
||||
|
|
24
sm.cpp
24
sm.cpp
|
@ -11,7 +11,6 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
|
||||
#include "sm.h"
|
||||
|
||||
//#include <kdebug.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <pwd.h>
|
||||
|
@ -23,6 +22,7 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
#include "client.h"
|
||||
#include <QSocketNotifier>
|
||||
#include <qsessionmanager.h>
|
||||
#include <kdebug.h>
|
||||
|
||||
namespace KWinInternal
|
||||
{
|
||||
|
@ -257,6 +257,28 @@ bool Workspace::sessionInfoWindowTypeMatch( Client* c, SessionInfo* info )
|
|||
return info->windowType == c->windowType();
|
||||
}
|
||||
|
||||
// maybe needed later
|
||||
#if 0
|
||||
// KMainWindow's without name() given have WM_WINDOW_ROLE in the form
|
||||
// of <appname>-mainwindow#<number>
|
||||
// when comparing them for fake session info, it's probably better to check
|
||||
// them without the trailing number
|
||||
bool Workspace::windowRoleMatch( const QByteArray& role1, const QByteArray& role2 )
|
||||
{
|
||||
if( role1.isEmpty() && role2.isEmpty())
|
||||
return true;
|
||||
int pos1 = role1.find( '#' );
|
||||
int pos2 = role2.find( '#' );
|
||||
bool ret;
|
||||
if( pos1 < 0 || pos2 < 0 || pos1 != pos2 )
|
||||
ret = role1 == role2;
|
||||
else
|
||||
ret = qstrncmp( role1, role2, pos1 ) == 0;
|
||||
kDebug() << "WR:" << role1 << ":" << pos1 << ":" << role2 << ":" << pos2 << ":::" << ret << endl;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char* const window_type_names[] =
|
||||
{
|
||||
"Unknown", "Normal" , "Desktop", "Dock", "Toolbar", "Menu", "Dialog",
|
||||
|
|
Loading…
Reference in a new issue