From 9a69f2a87a0d1586321d8edf2f5fcb019c1b50e4 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Fri, 14 Jul 2000 19:35:23 +0000 Subject: [PATCH] unicode caption support svn path=/trunk/kdebase/kwin/; revision=56896 --- client.cpp | 15 +++++++++------ workspace.cpp | 3 ++- 2 files changed, 11 insertions(+), 7 deletions(-) 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();