Show hostname in the title if it's different from KWin's hostname.

FEATURE:40969

svn path=/trunk/kdebase/kwin/; revision=361687
This commit is contained in:
Luboš Luňák 2004-11-09 12:17:18 +00:00
parent c80d47549c
commit d40ba7b252

View file

@ -1242,13 +1242,16 @@ void Client::setCaption( const QString& s, bool force )
s[ i ] = ' ';
cap_normal = s;
bool was_suffix = ( !cap_suffix.isEmpty());
cap_suffix = QString::null;
QString machine_suffix;
if( !isLocalMachine( wmClientMachine( false )))
machine_suffix = " <" + wmClientMachine( true ) + ">";
cap_suffix = machine_suffix;
if ( ( !isSpecialWindow() || isToolbar()) && workspace()->findClient( FetchNameInternalPredicate( this )))
{
int i = 2;
do
{
cap_suffix = " <" + QString::number(i) + ">";
cap_suffix = machine_suffix + " <" + QString::number(i) + ">";
i++;
} while ( workspace()->findClient( FetchNameInternalPredicate( this )));
info->setVisibleName( caption().utf8() );