[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-02-21 0:58:26
Message-ID: 20050221005826.166E91BC23 () office ! kde ! org
[Download RAW message or body]
CVS commit by aseigo:
don't add a window if the skiptaskbar status was removed because it is in
the process of being Withdrawn. prevents flicker in cases such as the
kicker mouse over effects
M +38 -14 taskmanager.cpp 1.87
--- kdebase/kicker/taskmanager/taskmanager.cpp #1.86:1.87
@@ -1,2 +1,4 @@
+#include <iostream>
+using namespace std;
/*****************************************************************
@@ -128,4 +130,5 @@ void TaskManager::windowAdded(WId w )
wType != NET::Utility)
{
+ cout << "TaskManager::windowAdded >> skippable" << endl;
return;
}
@@ -134,7 +137,9 @@ void TaskManager::windowAdded(WId w )
if ((info.state() & NET::SkipTaskbar) != 0)
{
+ cout << "TaskManager::windowAdded >> skip tha task bar" << endl;
_skiptaskbar_windows.push_front( w ); // remember them though
return;
}
+ cout << "TaskManager::windowAdded" << endl;
Window transient_for_tmp;
@@ -179,9 +184,13 @@ void TaskManager::windowRemoved(WId w )
// find task
Task* t = findTask(w);
- if (!t) return;
+ if (!t)
+ {
+ cout << "TaskManager::windowRemoved >> couldn't find associated task" << endl;
+ return;
+ }
- if (t->window() == w) {
+ if (t->window() == w)
+ {
_tasks.removeRef(t);
-
emit taskRemoved(t);
@@ -186,10 +195,17 @@ void TaskManager::windowRemoved(WId w )
emit taskRemoved(t);
- if(t == _active) _active = 0;
+ if (t == _active)
+ {
+ _active = 0;
+ }
+
delete t;
+ cout << "TM: Task for WId " << w << " removed." << endl;
//kdDebug() << "TM: Task for WId " << w << " removed." << endl;
}
- else {
+ else
+ {
t->removeTransient( w );
+ cout << "TM: Transient " << w << " for Task " << t->window() << " removed." << endl;
//kdDebug() << "TM: Transient " << w << " for Task " << t->window() << " removed." << endl;
}
@@ -198,15 +214,23 @@ void TaskManager::windowRemoved(WId w )
void TaskManager::windowChanged(WId w, unsigned int dirty)
{
- if( dirty & NET::WMState ) {
- NETWinInfo info ( qt_xdisplay(), w, qt_xrootwin(), NET::WMState );
- if ( (info.state() & NET::SkipTaskbar) != 0 ) {
- windowRemoved( w );
- _skiptaskbar_windows.push_front( w );
+ if (dirty & NET::WMState)
+ {
+ NETWinInfo info (qt_xdisplay(), w, qt_xrootwin(),
+ NET::WMState | NET::XAWMState);
+ if (info.state() & NET::SkipTaskbar)
+ {
+ windowRemoved(w);
+ _skiptaskbar_windows.push_front(w);
return;
}
- else {
- _skiptaskbar_windows.remove( w );
- if( !findTask( w ))
- windowAdded( w ); // skipTaskBar state was removed, so add this window
+ else
+ {
+ _skiptaskbar_windows.remove(w);
+ if (info.mappingState() != NET::Withdrawn && !findTask(w))
+ {
+ // skipTaskBar state was removed and the window is still
+ // mapped, so add this window
+ windowAdded( w );
+ }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic