do not accept empty captions, use unnamed instead.

svn path=/trunk/kdebase/kwin/; revision=35366
This commit is contained in:
Matthias Ettrich 1999-11-28 20:58:58 +00:00
parent 82b0710065
commit b529c9226f

View file

@ -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 );
}
}
/*!