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
This commit is contained in:
Luboš Luňák 2003-11-13 17:51:11 +00:00
parent 33e9753f6b
commit e243bdd43c

View file

@ -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