From 827e9b92be539dbe5b4b66bc3f51de24d94967aa Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Thu, 6 Sep 2001 09:21:19 +0000 Subject: [PATCH] completed fullscreen fix svn path=/trunk/kdebase/kwin/; revision=113471 --- client.cpp | 2 +- workspace.cpp | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/client.cpp b/client.cpp index bf3d3b7ae7..2a884ed29c 100644 --- a/client.cpp +++ b/client.cpp @@ -609,7 +609,6 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial ) if ( geom == workspace()->geometry() && inherits( "KWinInternal::NoBorderClient" ) ) { is_fullscreen = TRUE; may_move = FALSE; // don't let fullscreen windows be moved around - setStaysOnTop( TRUE ); // fullscreen windows shall be on top } if ( isMapped || session || isTransient() ) { @@ -2271,6 +2270,7 @@ void Client::setActive( bool act) delete autoRaiseTimer; autoRaiseTimer = 0; } + activeChange( active ); } diff --git a/workspace.cpp b/workspace.cpp index 0de8a401c6..27f412441e 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1278,14 +1278,24 @@ void Workspace::setActiveClient( Client* c ) { if ( active_client == c ) return; - if ( active_client ) + if ( active_client ) { active_client->setActive( FALSE ); + if ( active_client->isFullScreen() && active_client->staysOnTop() + && c && c->mainClient() != active_client->mainClient() ) { + active_client->setStaysOnTop( FALSE ); + lowerClient( active_client ); + } + } active_client = c; last_active_client = active_client; if ( active_client ) { - focus_chain.remove( c ); - if ( c->wantsTabFocus() ) - focus_chain.append( c ); + if ( active_client->isFullScreen() && !active_client->staysOnTop() ) { + active_client->setStaysOnTop( TRUE ); + raiseClient( active_client ); + } + focus_chain.remove( c ); + if ( c->wantsTabFocus() ) + focus_chain.append( c ); } // toplevel menubar handling @@ -1352,6 +1362,7 @@ void Workspace::activateClient( Client* c, bool force ) if (!c->isOnDesktop(currentDesktop()) ) { setCurrentDesktop( c->desktop() ); } + } void Workspace::iconifyOrDeiconifyTransientsOf( Client* c )