From b7d19892d3a61759197c87f6cbb83389f7ac3926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 10 Apr 2006 22:11:44 +0000 Subject: [PATCH] Don't deactivate the showing desktop state when a new window is shown that belongs to the desktop (#113552). svn path=/trunk/KDE/kdebase/workspace/; revision=528392 --- client.cpp | 11 ++++++++++- manage.cpp | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/client.cpp b/client.cpp index 0b4a833912..f742c38868 100644 --- a/client.cpp +++ b/client.cpp @@ -891,7 +891,16 @@ void Client::updateVisibility() } if( show ) { - if( workspace()->showingDesktop()) + bool belongs_to_desktop = false; + for( ClientList::ConstIterator it = group()->members().begin(); + it != group()->members().end(); + ++it ) + if( (*it)->isDesktop()) + { + belongs_to_desktop = true; + break; + } + if( !belongs_to_desktop && workspace()->showingDesktop()) workspace()->resetShowingDesktop( true ); if( isShade()) setMappingState( IconicState ); diff --git a/manage.cpp b/manage.cpp index 35fd1674a7..cebd623b22 100644 --- a/manage.cpp +++ b/manage.cpp @@ -454,7 +454,16 @@ bool Client::manage( Window w, bool isMapped ) if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || workspace()->sessionSaving())) workspace()->setCurrentDesktop( desktop()); - if( workspace()->showingDesktop()) + bool belongs_to_desktop = false; + for( ClientList::ConstIterator it = group()->members().begin(); + it != group()->members().end(); + ++it ) + if( (*it)->isDesktop()) + { + belongs_to_desktop = true; + break; + } + if( !belongs_to_desktop && workspace()->showingDesktop()) workspace()->resetShowingDesktop( false ); if( isOnCurrentDesktop() && !isMapped && !allow )