From a81ef3b07fe77d5b474d61bea66b0dd46d4a1b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 6 Oct 2004 14:02:30 +0000 Subject: [PATCH] If a fullscreen window has a dialog shown, still keep it on tops of other windows. svn path=/trunk/kdebase/kwin/; revision=352347 --- activation.cpp | 1 + client.cpp | 2 ++ layers.cpp | 12 ++++++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/activation.cpp b/activation.cpp index ae5a369170..ef86210b6f 100644 --- a/activation.cpp +++ b/activation.cpp @@ -451,6 +451,7 @@ void Workspace::gotFocusIn( const Client* c ) void Workspace::setShouldGetFocus( Client* c ) { should_get_focus.append( c ); + updateStackingOrder(); // e.g. fullscreens have different layer when active/not-active } // focus_in -> the window got FocusIn event diff --git a/client.cpp b/client.cpp index aadce474bc..9f47eded89 100644 --- a/client.cpp +++ b/client.cpp @@ -173,6 +173,7 @@ void Client::deleteClient( Client* c, allowed_t ) */ void Client::releaseWindow( bool on_shutdown ) { + StackingUpdatesBlocker blocker( workspace()); if (moveResizeMode) leaveMoveResize(); finishWindowRules(); @@ -221,6 +222,7 @@ void Client::releaseWindow( bool on_shutdown ) // (e.g. the application closed it) void Client::destroyClient() { + StackingUpdatesBlocker blocker( workspace()); if (moveResizeMode) leaveMoveResize(); finishWindowRules(); diff --git a/layers.cpp b/layers.cpp index 645ea8724c..83e69540a2 100644 --- a/layers.cpp +++ b/layers.cpp @@ -712,14 +712,14 @@ Layer Client::belongsToLayer() const return DockLayer; if( isTopMenu()) return DockLayer; - // only raise fullscreen above docks if it's the topmost window in unconstrained stacking order, - // i.e. the window set to be topmost by the user - bool raise_special_active_windows = ( workspace()->topClientOnDesktop( desktop(), true ) == this ); if( keepAbove()) return AboveLayer; - if( isFullScreen() && workspace()->activeClient() != NULL - && ( workspace()->activeClient() == this || this->hasTransient( workspace()->activeClient(), true )) - && raise_special_active_windows ) + // only raise fullscreen above docks if it's the topmost window in unconstrained stacking order, + // i.e. the window set to be topmost by the user (also includes transients of the fullscreen window) + const Client* ac = workspace()->mostRecentlyActivatedClient(); // instead of activeClient() - avoids flicker + if( isFullScreen() && ac != NULL + && workspace()->topClientOnDesktop( desktop(), true ) == ac + && ( ac == this || this->hasTransient( ac, true ))) return ActiveLayer; return NormalLayer; }