From f91bd865af5b26d154af49687b246ae88ada1461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 13 Oct 2003 16:22:58 +0000 Subject: [PATCH] Don't show windows that have modals in the Alt+Tab dialog, show the modals instead. svn path=/trunk/kdebase/kwin/; revision=258584 --- tabbox.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tabbox.cpp b/tabbox.cpp index aa72f510a3..be8ecaacf7 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -96,9 +96,20 @@ void TabBox::reset() && (!c->isMinimized() || !c->isTransient() || c->isUtility()) ) { if ( client == c ) + { + clients.remove( c ); clients.prepend( c ); + } else - clients += c; + { // don't add windows that have modal dialogs + Client* modal = c->findModal(); + if( modal == NULL || modal == c ) + clients += c; + else if( !clients.contains( modal )) + clients += modal; + else + ; // nothing + } cw = fm.width( c->caption() ) + 40; if ( cw > wmax ) wmax = cw; @@ -151,16 +162,7 @@ void TabBox::nextPrev( bool next) client = 0; break; } - } while (client && - (( !options_traverse_all && - !client->isOnDesktop(workspace()->currentDesktop()) ) || - ( client->isMinimized() && client->isTransient() && !client->isUtility())) - ); - - - if (!options_traverse_all && client - && !client->isOnDesktop(workspace()->currentDesktop())) - client = 0; + } while ( client && !clients.contains( client )); } else if( mode() == DesktopMode ) {