From e243bdd43c56b46cadead52a66288167c3fc77fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 13 Nov 2003 17:51:11 +0000 Subject: [PATCH] Open Konqueror at kde.org, open another one at kde.org, close the second one, open Konqueror at dot.kde.org -> it would still have the old caption in taskbar due to the old _NET_WM_VISIBLE_NAME property value -> fixed. svn path=/trunk/kdebase/kwin/; revision=266857 --- client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client.cpp b/client.cpp index 00cddc50b9..b6a9be8b5a 100644 --- a/client.cpp +++ b/client.cpp @@ -1170,6 +1170,7 @@ void Client::fetchName() s = KWin::readNameProperty( window(), XA_WM_NAME ); if ( s != cap_normal ) { + bool reset_name = cap_normal.isEmpty(); cap_normal = s; bool was_suffix = ( !cap_suffix.isEmpty()); cap_suffix = QString::null; @@ -1182,8 +1183,10 @@ void Client::fetchName() i++; } while ( workspace()->findClient( FetchNameInternalPredicate( this ))); info->setVisibleName( caption().utf8() ); + reset_name = false; } - if( was_suffix && cap_suffix.isEmpty()) + if(( was_suffix && cap_suffix.isEmpty() + || reset_name )) // if it was new window, it may have old value still set, if the window is reused { info->setVisibleName( "" ); // remove info->setVisibleIconName( "" ); // remove