Delay resetting client decorations a bit in some cases, maybe we have to do
it anyway later on in which case we can save some flicker & CPU by doing it only once. svn path=/trunk/kdebase/kwin/; revision=80040
This commit is contained in:
parent
35d0d793f6
commit
03fc02caf3
2 changed files with 15 additions and 2 deletions
|
@ -321,10 +321,13 @@ void Workspace::init()
|
|||
Window root_return, parent_return, *wins;
|
||||
XWindowAttributes attr;
|
||||
|
||||
connect(&resetTimer, SIGNAL(timeout()), this,
|
||||
SLOT(slotResetAllClients()));
|
||||
|
||||
connect(&mgr, SIGNAL(resetAllClients()), this,
|
||||
SLOT(slotResetAllClients()));
|
||||
connect(kapp, SIGNAL(appearanceChanged()), this,
|
||||
SLOT(slotResetAllClients()));
|
||||
SLOT(slotResetAllClientsDelayed()));
|
||||
|
||||
XQueryTree(qt_xdisplay(), root, &root_return, &parent_return, &wins, &nwins);
|
||||
for (i = 0; i < nwins; i++) {
|
||||
|
@ -1592,6 +1595,7 @@ void Workspace::unclutterDesktop()
|
|||
*/
|
||||
void Workspace::reconfigure()
|
||||
{
|
||||
slotResetAllClientsDelayed();
|
||||
KGlobal::config()->reparseConfiguration();
|
||||
mgr.updatePlugin();
|
||||
options->reload();
|
||||
|
@ -2786,6 +2790,10 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent key )
|
|||
|
||||
}
|
||||
|
||||
void Workspace::slotResetAllClientsDelayed()
|
||||
{
|
||||
resetTimer.start(200, true);
|
||||
}
|
||||
|
||||
/*!
|
||||
Puts a new decoration frame around every client. Used to react on
|
||||
|
@ -2793,7 +2801,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent key )
|
|||
*/
|
||||
void Workspace::slotResetAllClients()
|
||||
{
|
||||
|
||||
resetTimer.stop();
|
||||
ClientList stack = stacking_order;
|
||||
Client* active = activeClient();
|
||||
block_focus = TRUE;
|
||||
|
|
|
@ -12,6 +12,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|||
#include <qguardedptr.h>
|
||||
#include <qvaluelist.h>
|
||||
#include <qlist.h>
|
||||
#include <qtimer.h>
|
||||
#include "options.h"
|
||||
#include "plugins.h"
|
||||
#include "KWinInterface.h"
|
||||
|
@ -233,6 +234,7 @@ public slots:
|
|||
|
||||
void slotMouseEmulation();
|
||||
|
||||
void slotResetAllClientsDelayed();
|
||||
void slotResetAllClients();
|
||||
|
||||
void slotLogout();
|
||||
|
@ -350,6 +352,9 @@ private:
|
|||
// colormap handling
|
||||
Colormap default_colormap;
|
||||
Colormap installed_colormap;
|
||||
|
||||
// Timer to collect requests for 'ResetAllClients'
|
||||
QTimer resetTimer;
|
||||
};
|
||||
|
||||
inline WId Workspace::rootWin() const
|
||||
|
|
Loading…
Reference in a new issue