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()
{
//#### 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() ) {

View file

@ -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();