From 79d5c973459252a14222589ad8e0421a8d90a0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 25 Aug 2004 11:49:30 +0000 Subject: [PATCH] Propertly remove _NET_WM_VISIBLE_NAME. CCMAIL: 87475-done@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=340847 --- client.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/client.cpp b/client.cpp index 976e10463c..aadce474bc 100644 --- a/client.cpp +++ b/client.cpp @@ -1232,7 +1232,7 @@ void Client::setCaption( const QString& s, bool force ) { if ( s != cap_normal || force ) { - bool reset_name = cap_normal.isEmpty(); + bool reset_name = force; for( unsigned int i = 0; i < s.length(); ++i ) @@ -1269,16 +1269,21 @@ void Client::setCaption( const QString& s, bool force ) void Client::fetchIconicName() { QString s; - if ( info->iconName() && info->iconName()[ 0 ] != '\0' ) s = QString::fromUtf8( info->iconName() ); else s = KWin::readNameProperty( window(), XA_WM_ICON_NAME ); if ( s != cap_iconic ) { + bool was_set = !cap_iconic.isEmpty(); cap_iconic = s; - if( !cap_suffix.isEmpty() && !cap_iconic.isEmpty()) // keep the same suffix in iconic name if it's set - info->setVisibleIconName( ( s + cap_suffix ).utf8() ); + if( !cap_suffix.isEmpty()) + { + if( !cap_iconic.isEmpty()) // keep the same suffix in iconic name if it's set + info->setVisibleIconName( ( s + cap_suffix ).utf8() ); + else if( was_set ) + info->setVisibleIconName( "" ); //remove + } } }