Bug 124721 - alt+tab does not show all windows from all desktops
Summary: alt+tab does not show all windows from all desktops
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages All
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 124841 125532 125635 125901 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-01 22:15 UTC by Markus Tacker
Modified: 2006-04-19 18:40 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Tacker 2006-04-01 22:15:54 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Gentoo Packages
OS:                Linux

Alt+TAB doesn't show alle open windows from all desktop what it used to do on
3.5.1.

The option in the kontrol center does not have any affect.
Comment 1 Philip Rodrigues 2006-04-02 00:56:54 UTC
Same seems to happen here - the control center option has no effect
Comment 2 david.ponce 2006-04-02 20:36:14 UTC
Same here with kdebase-3.5.2-1.2.fc4 from the kde-redhat repo. on my FC4 box.
Reverting back to kdebase-3.5.1 fixed the problem.

Comment 3 Philip Rodrigues 2006-04-04 23:19:27 UTC
*** Bug 124841 has been marked as a duplicate of this bug. ***
Comment 4 Bartosz Fabianowski 2006-04-07 12:03:46 UTC
I can confirm this on FreeBSD using FreeBSD ports. In KDE 3.5.1, I could traverse windows on all desktops via alt+tab. On 3.5.2, this setting gets ignored and I only see the windows on the current desktop.
Comment 5 Emmanuel C 2006-04-07 23:31:10 UTC
another info :
when the list is not displayed AND the option to navigate on all desktop is activated (first option is disabled but second is enabled in the control center), the navigation shows all windows from all desktop.

So it seems that this is the windows list that is not complete.
Comment 6 Bartosz Fabianowski 2006-04-11 02:31:32 UTC
Here is a bit of analysis on what is going on:
In SVN revision 514048, a separate focus chain for each desktop was introduced. The methods Workspace::nextFocusChainClient() and Workspace::previousFocusChainClient() (both in kdebase/kwin/tabbox.cpp) now only look for windows on the current desktop. Therefore, only windows from the current desktop appear in the alt-tab box. The easiest way to fix this problem would probably be to revert the two methods above to their old behavior - they should return windows from all desktops again. TabBox::createClientList() checks whether the returned window is on the desired desktop or not anyway.
Comment 7 Lubos Lunak 2006-04-11 16:10:12 UTC
SVN commit 528608 by lunakl:

Separate focus chains are nice, but KDE-style Alt+Tab not limited
to the current desktop still needs the global one for MRU.
BUG: 124721



 M  +15 -0     layers.cpp  
 M  +12 -14    tabbox.cpp  
 M  +9 -0      workspace.cpp  
 M  +1 -0      workspace.h  


--- branches/KDE/3.5/kdebase/kwin/layers.cpp #528607:528608
@@ -441,6 +441,21 @@
                 }
             }
       	}
+    // the same for global_focus_chain
+    if( c->wantsTabFocus() && global_focus_chain.contains( active_client ))
+        {
+        global_focus_chain.remove( c );
+        for( ClientList::Iterator it = global_focus_chain.fromLast();
+             it != global_focus_chain.end();
+             --it )
+            {
+            if( Client::belongToSameApplication( active_client, *it ))
+                {
+                global_focus_chain.insert( it, c );
+                break;
+                }
+            }
+      	}
     updateStackingOrder();
     }
 
--- branches/KDE/3.5/kdebase/kwin/tabbox.cpp #528607:528608
@@ -1168,14 +1168,13 @@
 */
 Client* Workspace::nextFocusChainClient( Client* c ) const
     {
-    int desktop = !c || c->isOnAllDesktops() ? currentDesktop() : c->desktop();
-    if ( focus_chain[desktop].isEmpty() )
+    if ( global_focus_chain.isEmpty() )
         return 0;
-    ClientList::ConstIterator it = focus_chain[desktop].find( c );
-    if ( it == focus_chain[desktop].end() )
-        return focus_chain[desktop].last();
-    if ( it == focus_chain[desktop].begin() )
-        return focus_chain[desktop].last();
+    ClientList::ConstIterator it = global_focus_chain.find( c );
+    if ( it == global_focus_chain.end() )
+        return global_focus_chain.last();
+    if ( it == global_focus_chain.begin() )
+        return global_focus_chain.last();
     --it;
     return *it;
     }
@@ -1186,15 +1185,14 @@
 */
 Client* Workspace::previousFocusChainClient( Client* c ) const
     {
-    int desktop = !c || c->isOnAllDesktops() ? currentDesktop() : c->desktop();
-    if ( focus_chain[desktop].isEmpty() )
+    if ( global_focus_chain.isEmpty() )
         return 0;
-    ClientList::ConstIterator it = focus_chain[desktop].find( c );
-    if ( it == focus_chain[desktop].end() )
-        return focus_chain[desktop].first();
+    ClientList::ConstIterator it = global_focus_chain.find( c );
+    if ( it == global_focus_chain.end() )
+        return global_focus_chain.first();
     ++it;
-    if ( it == focus_chain[desktop].end() )
-        return focus_chain[desktop].first();
+    if ( it == global_focus_chain.end() )
+        return global_focus_chain.first();
     return *it;
     }
 
--- branches/KDE/3.5/kdebase/kwin/workspace.cpp #528607:528608
@@ -564,6 +564,7 @@
          i <= numberOfDesktops();
          ++i )
         focus_chain[ i ].remove( c );
+    global_focus_chain.remove( c );
     attention_chain.remove( c );
     if( c->isTopMenu())
         removeTopMenu( c );
@@ -598,6 +599,7 @@
              i<= numberOfDesktops();
              ++i )
             focus_chain[i].remove(c);
+        global_focus_chain.remove( c );
         return;
         }
     if(c->desktop() == NET::OnAllDesktops)
@@ -631,6 +633,13 @@
                 focus_chain[ i ].remove( c );
             }
         }
+    if( make_first )
+        {
+        global_focus_chain.remove( c );
+        global_focus_chain.append( c );
+        }
+    else if( !global_focus_chain.contains( c ))
+        global_focus_chain.prepend( c );
     }
 
 void Workspace::updateCurrentTopMenu()
--- branches/KDE/3.5/kdebase/kwin/workspace.h #528607:528608
@@ -510,6 +510,7 @@
         ClientList unconstrained_stacking_order;
         ClientList stacking_order;
         QValueVector< ClientList > focus_chain;
+        ClientList global_focus_chain; // this one is only for things like tabbox's MRU
         ClientList should_get_focus; // last is most recent
         ClientList attention_chain;
         
Comment 8 Lubos Lunak 2006-04-18 12:59:16 UTC
*** Bug 125635 has been marked as a duplicate of this bug. ***
Comment 9 Lubos Lunak 2006-04-18 13:00:14 UTC
*** Bug 125532 has been marked as a duplicate of this bug. ***
Comment 10 Maksim Orlovich 2006-04-19 18:40:12 UTC
*** Bug 125901 has been marked as a duplicate of this bug. ***