do not accept empty captions, use unnamed instead.
svn path=/trunk/kdebase/kwin/; revision=35366
This commit is contained in:
parent
82b0710065
commit
b529c9226f
1 changed files with 22 additions and 17 deletions
11
client.cpp
11
client.cpp
|
@ -1,3 +1,4 @@
|
|||
#include <klocale.h>
|
||||
#include <qapplication.h>
|
||||
#include <qcursor.h>
|
||||
#include <qbitmap.h>
|
||||
|
@ -407,8 +408,14 @@ void Client::getWmNormalHints()
|
|||
void Client::fetchName()
|
||||
{
|
||||
char* name = 0;
|
||||
QString s;
|
||||
if ( XFetchName( qt_xdisplay(), win, &name ) && name ) {
|
||||
QString s = QString::fromLatin1( name );
|
||||
s = QString::fromLatin1( name );
|
||||
XFree( name );
|
||||
}
|
||||
if ( s.isEmpty() )
|
||||
s = i18n("unnamed");
|
||||
|
||||
if ( s != caption() ) {
|
||||
setCaption( "" );
|
||||
if (workspace()->hasCaption( s ) ){
|
||||
|
@ -425,8 +432,6 @@ void Client::fetchName()
|
|||
if ( !isWithdrawn() )
|
||||
captionChange( caption() );
|
||||
}
|
||||
XFree( name );
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in a new issue