[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kicker/taskmanager
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2005-04-17 23:20:44
Message-ID: 20050417232044.B72A75FA () office ! kde ! org
[Download RAW message or body]
CVS commit by aseigo:
a pair of optimizaitons: only track geometry if we need to, don't pay
attention to WMName because we simply do not use it nor care about it and
it changes a LOT (e.g. every time you type a character into kwrite or
konsole!)
M +9 -9 taskmanager.cpp 1.96
M +8 -0 taskmanager.h 1.63
--- kdebase/kicker/taskmanager/taskmanager.cpp #1.95:1.96
@@ -55,5 +55,6 @@ TaskManager::TaskManager()
_active(0),
_startup_info(0),
- m_winModule(new KWinModule())
+ m_winModule(new KWinModule()),
+ m_trackGeometry(false)
{
KGlobal::locale()->insertCatalogue("libtaskmanager");
@@ -257,7 +258,8 @@ void TaskManager::windowChanged(WId w, u
// check if any state we are interested in is marked dirty
- if(!(dirty & (NET::WMVisibleName | NET::WMName | NET::WMVisibleIconName |
+ if(!(dirty & (NET::WMVisibleName | NET::WMVisibleIconName |
NET::WMIconName | NET::WMState | NET::WMIcon |
- NET::XAWMState | NET::WMDesktop | NET::WMGeometry)))
+ NET::XAWMState | NET::WMDesktop) ||
+ (m_trackGeometry && dirty & NET::WMGeometry)))
{
return;
@@ -274,15 +276,13 @@ void TaskManager::windowChanged(WId w, u
// refresh icon pixmap if necessary
- if (dirty == NET::WMIcon)
+ if (dirty & NET::WMIcon)
{
t->refreshIcon();
}
- else
+
+ if (dirty != NET::WMIcon)
{
+ // only refresh this stuff if we have other changes besides icons
t->refresh();
- if (dirty & NET::WMIcon)
- {
- t->refreshIcon();
- }
}
--- kdebase/kicker/taskmanager/taskmanager.h #1.62:1.63
@@ -567,4 +567,11 @@ public:
/**
+ * Tells the task manager whether or not we care about geometry
+ * updates. This generates a lot of activity so should only be used
+ * when necessary.
+ */
+ void trackGeometry(bool track) { m_trackGeometry = track; }
+
+ /**
* Returns whether the Window with WId wid is on the screen screen
*/
@@ -642,4 +649,5 @@ private:
KStartupInfo* _startup_info;
KWinModule* m_winModule;
+ bool m_trackGeometry;
static TaskManager* m_self;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic