No kde3/qt3 support in kwin core. Saves about 150M of memory in gdb

by not loading the support libraries and the complete kdelibs stack it depends
on. Gdb taking 0.5M and lousy handling of near-OOM in Linux kernel
can be a pretty bad combination :(.


svn path=/trunk/KDE/kdebase/workspace/; revision=741856
This commit is contained in:
Luboš Luňák 2007-11-26 15:42:44 +00:00
parent e33d25bb77
commit d6b7ef180d
15 changed files with 29 additions and 29 deletions

View file

@ -1,7 +1,3 @@
add_definitions (-DQT3_SUPPORT)
add_subdirectory( lib )
include_directories(
@ -65,7 +61,7 @@ qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWin::Works
kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
target_link_libraries(kdeinit_kwin ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KDEUI_LIBS} kdecorations kwineffects ${X11_LIBRARIES} ${QT_QT3SUPPORT_LIBRARY} )
target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} kdecorations kwineffects ${X11_LIBRARIES})
if(OPENGL_FOUND)
target_link_libraries(kdeinit_kwin ${OPENGL_gl_LIBRARY})
# -ldl used by OpenGL code

View file

@ -15,13 +15,13 @@ License. See the file "COPYING" for the exact licensing terms.
#include <QPainter>
#include <QDateTime>
#include <QProcess>
#include <k3process.h>
#include <unistd.h>
#include <kstandarddirs.h>
#include <QWhatsThis>
#include <kwindowsystem.h>
#include <kiconloader.h>
#include <stdlib.h>
#include <signal.h>
#include "bridge.h"
#include "group.h"
@ -1105,21 +1105,15 @@ void Client::killProcess( bool ask, Time timestamp )
}
else
{
process_killer = new K3Process( this );
*process_killer << KStandardDirs::findExe( "kwin_killer_helper" )
<< "--pid" << QByteArray().setNum( pid ) << "--hostname" << machine
process_killer = new QProcess( this );
connect( process_killer, SIGNAL( error( QProcess::ProcessError )), SLOT( processKillerExited()));
connect( process_killer, SIGNAL( finished( int, QProcess::ExitStatus )), SLOT( processKillerExited()));
process_killer->start( KStandardDirs::findExe( "kwin_killer_helper" ),
QStringList() << "--pid" << QByteArray().setNum( pid ) << "--hostname" << machine
<< "--windowname" << caption().toUtf8()
<< "--applicationname" << resourceClass()
<< "--wid" << QString::number( window() )
<< "--timestamp" << QString::number( timestamp );
connect( process_killer, SIGNAL( processExited( K3Process* )),
SLOT( processKillerExited()));
if( !process_killer->start( K3Process::NotifyOnExit ))
{
delete process_killer;
process_killer = NULL;
return;
}
<< "--timestamp" << QString::number( timestamp ));
}
}

View file

@ -36,8 +36,8 @@ License. See the file "COPYING" for the exact licensing terms.
#include <X11/extensions/sync.h>
#endif
class QProcess;
class QTimer;
class K3Process;
class KStartupInfoData;
namespace KWin
@ -475,7 +475,7 @@ class Client
Window window_group;
Layer in_layer;
QTimer* ping_timer;
K3Process* process_killer;
QProcess* process_killer;
Time ping_timestamp;
Time user_time;
unsigned long allowed_actions;

View file

@ -1,3 +1,4 @@
add_definitions (-DQT3_SUPPORT)
add_subdirectory( config )

View file

@ -1034,10 +1034,10 @@ void KDE2Client::paintEvent( QPaintEvent* )
(caption().isRightToLeft() ? Qt::AlignRight : Qt::AlignLeft) | Qt::AlignVCenter,
caption() );
bitBlt( widget(), 2, 2, titleBuffer );
p2.end();
p.drawPixmap( 2, 2, *titleBuffer );
// Ensure a shaded window has no unpainted areas
// Is this still needed?
#if 1

View file

@ -1,3 +1,4 @@
add_definitions (-DQT3_SUPPORT)
add_subdirectory( config )

View file

@ -1,3 +1,4 @@
add_definitions (-DQT3_SUPPORT)
add_subdirectory( config )

View file

@ -1,3 +1,5 @@
add_definitions (-DQT3_SUPPORT)
########### next target ###############
set(kwin_oxygen_SRCS

View file

@ -1,3 +1,4 @@
add_definitions (-DQT3_SUPPORT)
add_subdirectory( config )

View file

@ -1,3 +1,4 @@
add_definitions (-DQT3_SUPPORT)
########### next target ###############

View file

@ -39,11 +39,11 @@ BoxSwitchEffect::BoxSwitchEffect()
#ifdef HAVE_XRENDER
alphaFormat = XRenderFindStandardFormat( display(), PictStandardARGB32 );
#endif
color_frame = KColorScheme( QPalette::Active, KColorScheme::Window ).background();
color_frame = KColorScheme( QPalette::Active, KColorScheme::Window ).background().color();
color_frame.setAlphaF( 0.9 );
color_highlight = KColorScheme( QPalette::Active, KColorScheme::Selection ).background();
color_highlight = KColorScheme( QPalette::Active, KColorScheme::Selection ).background().color();
color_highlight.setAlphaF( 0.9 );
color_text = KColorScheme( QPalette::Active, KColorScheme::Window ).foreground();
color_text = KColorScheme( QPalette::Active, KColorScheme::Window ).foreground().color();
}
BoxSwitchEffect::~BoxSwitchEffect()

View file

@ -1,3 +1,5 @@
add_definitions (-DQT3_SUPPORT)
########### next target ###############
set(kcm_kwindecoration_PART_SRCS kwindecoration.cpp buttons.cpp preview.cpp )

View file

@ -1,4 +1,4 @@
ADD_DEFINITIONS(-DKCMRULES)
ADD_DEFINITIONS(-DKCMRULES -DQT3_SUPPORT)
########### next target ###############
set(kwinrules_SRCS ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp)

View file

@ -427,7 +427,7 @@ void Workspace::restackClientUnderActive( Client* c )
if( Client::belongToSameApplication( active_client, c ))
{ // put it below the active window if it's the same app
unconstrained_stacking_order.removeAll( c );
unconstrained_stacking_order.insert( unconstrained_stacking_order.find( active_client ), c );
unconstrained_stacking_order.insert( unconstrained_stacking_order.indexOf( active_client ), c );
}
else
{ // put in the stacking order below _all_ windows belonging to the active application
@ -456,7 +456,7 @@ void Workspace::restackClientUnderActive( Client* c )
if( Client::belongToSameApplication( active_client, c ))
{ // put it after the active window if it's the same app
focus_chain[ desktop ].removeAll( c );
focus_chain[ desktop ].insert( focus_chain[ desktop ].find( active_client ), c );
focus_chain[ desktop ].insert( focus_chain[ desktop ].indexOf( active_client ), c );
}
else
{ // put it in focus_chain[currentDesktop()] after all windows belonging to the active applicationa
@ -480,7 +480,7 @@ void Workspace::restackClientUnderActive( Client* c )
if( Client::belongToSameApplication( active_client, c ))
{
global_focus_chain.removeAll( c );
global_focus_chain.insert( global_focus_chain.find( active_client ), c );
global_focus_chain.insert( global_focus_chain.indexOf( active_client ), c );
}
else
{

1
sm.h
View file

@ -17,6 +17,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <ksessionmanager.h>
#include <X11/SM/SMlib.h>
#include <netwm_def.h>
#include <qrect.h>
class QSocketNotifier;