From 9c0f71e6017bbbac81b81e4d566dfb1f6c5976ef Mon Sep 17 00:00:00 2001 From: Karol Szwed Date: Mon, 4 Jun 2001 14:01:00 +0000 Subject: [PATCH] Making reconfigure() timer buffered so that we don't get flooded with too many reconfigure events at once, which would re-client all windows multiple times and cause lots of ugly flicker. svn path=/trunk/kdebase/kwin/; revision=100375 --- workspace.cpp | 11 ++++++++++- workspace.h | 7 ++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index 67fe1e36cc..4b98e34651 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -368,6 +368,8 @@ void Workspace::init() connect(&resetTimer, SIGNAL(timeout()), this, SLOT(slotResetAllClients())); + connect(&reconfigureTimer, SIGNAL(timeout()), this, + SLOT(slotReconfigure())); connect(mgr, SIGNAL(resetAllClients()), this, SLOT(slotResetAllClients())); @@ -1755,11 +1757,18 @@ void Workspace::unclutterDesktop() } +void Workspace::reconfigure() +{ + reconfigureTimer.start(200, true); +} + + /*! Reread settings */ -void Workspace::reconfigure() +void Workspace::slotReconfigure() { + reconfigureTimer.stop(); KGlobal::config()->reparseConfiguration(); options->reload(); keys->readSettings(); diff --git a/workspace.h b/workspace.h index e8b1030f76..2f00a77b85 100644 --- a/workspace.h +++ b/workspace.h @@ -150,6 +150,7 @@ public: void raiseClient( Client* c ); void lowerClient( Client* c ); void raiseOrLowerClient( Client * ); + void reconfigure(); void clientHidden( Client* ); @@ -208,7 +209,6 @@ public: // dcop interface void cascadeDesktop(); void unclutterDesktop(); - void reconfigure(); void doNotManage(QString); void setCurrentDesktop( int new_desktop ); @@ -269,6 +269,8 @@ public slots: void slotResetAllClientsDelayed(); void slotResetAllClients(); + void slotReconfigure(); + void slotKillWindow(); private slots: @@ -400,6 +402,9 @@ private: // Timer to collect requests for 'ResetAllClients' QTimer resetTimer; + // Timer to collect requests for 'reconfigure' + QTimer reconfigureTimer; + QTimer focusEnsuranceTimer; WorkspacePrivate* d;