diff --git a/client.cpp b/client.cpp index b88f73df31..8465359b93 100644 --- a/client.cpp +++ b/client.cpp @@ -603,13 +603,16 @@ void Client::getWmNormalHints() */ void Client::fetchName() { -//#### QString s = KWM::title( win ); QString s; - - char* c = 0; - if ( XFetchName( qt_xdisplay(), win, &c ) != 0 ) { - s = QString::fromLocal8Bit( c ); - XFree( c ); + + if ( info->name() ) { + s = QString::fromUtf8( info->name() ); + } else { + char* c = 0; + if ( XFetchName( qt_xdisplay(), win, &c ) != 0 ) { + s = QString::fromLocal8Bit( c ); + XFree( c ); + } } if ( s != caption() ) { diff --git a/workspace.cpp b/workspace.cpp index b8e24decdf..b0ee9979b0 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1032,7 +1032,8 @@ bool Workspace::hasCaption( const QString& caption ) void Workspace::requestFocus( Client* c) { if (!focusChangeEnabled()) - return; + return; + //TODO will be different for non-root clients. (subclassing?) if ( !c ) { focusToNull();