unicode caption support

svn path=/trunk/kdebase/kwin/; revision=56896
This commit is contained in:
Matthias Ettrich 2000-07-14 19:35:23 +00:00
parent 36a5d47520
commit 9a69f2a87a
2 changed files with 11 additions and 7 deletions

View file

@ -603,13 +603,16 @@ void Client::getWmNormalHints()
*/ */
void Client::fetchName() void Client::fetchName()
{ {
//#### QString s = KWM::title( win );
QString s; QString s;
char* c = 0; if ( info->name() ) {
if ( XFetchName( qt_xdisplay(), win, &c ) != 0 ) { s = QString::fromUtf8( info->name() );
s = QString::fromLocal8Bit( c ); } else {
XFree( c ); char* c = 0;
if ( XFetchName( qt_xdisplay(), win, &c ) != 0 ) {
s = QString::fromLocal8Bit( c );
XFree( c );
}
} }
if ( s != caption() ) { if ( s != caption() ) {

View file

@ -1032,7 +1032,8 @@ bool Workspace::hasCaption( const QString& caption )
void Workspace::requestFocus( Client* c) void Workspace::requestFocus( Client* c)
{ {
if (!focusChangeEnabled()) if (!focusChangeEnabled())
return; return;
//TODO will be different for non-root clients. (subclassing?) //TODO will be different for non-root clients. (subclassing?)
if ( !c ) { if ( !c ) {
focusToNull(); focusToNull();