[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: minimizing an always-on-top window by clicking on its taskbar representation
From:       Matthias Ettrich <ettrich () trolltech ! com>
Date:       2002-03-25 18:23:02
[Download RAW message or body]

On Monday 25 March 2002 00:52, Cristian Tibirna wrote:
> Hello John, Matthias
>
> Look at bug:39733. It applies to any window, not only to xmms. Reason is
> line 406 in kdebase/kicker/taskmanager/taskmanager.cpp. I don't understand
> the t.isAlwaysOnTop() == isAlwaysOnTop() part.
>
> Another thing that doesn't look nice to me is the code duplication in
> TaskManager::isOnTop() and Task::isOnTop(). They were already merged around
> cvs release 1.43 (by John) but are now again duplicated.
>
> I think I don't have all the necessary kicker picture to correct this
> situation. Please help me. Thanks
>
> CT

Your analysis is correct, I can only explain with only half a fix commited 
from either me or Matthias Elter. Here's the patch that should have been 
commited:


diff -d -u -r1.52 taskmanager.cpp
--- taskmanager.cpp     2002/03/10 10:19:34     1.52
+++ taskmanager.cpp     2002/03/25 18:20:03
@@ -394,17 +394,7 @@

 bool Task::isOnTop() const
 {
-    for (QValueList<WId>::ConstIterator it = 
kwin_module->stackingOrder().fromLast();
-         it != kwin_module->stackingOrder().end(); --it ) {
-
-        if ( (*it) == _win || hasTransient( *it ))
-            return true;
-
-        Task t(*it, 0);
-        if ( !t.isIconified() && (t.isAlwaysOnTop() == isAlwaysOnTop()) )
-            return false;
-    }
-    return false;
+    return taskManager()->isOnTop( this );
 }

 bool Task::isModified() const



The TaskManager::isOnTop( const Task*) function exists for the only purpose of 
being called by Task::isOnTop(). Don't ask me why this wasn't commited....


Matthis
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic