Keep window role as lowercase, just like wmclass, for rules matching.

svn path=/trunk/kdebase/kwin/; revision=324251
icc-effect-5.14.5
Luboš Luňák 2004-06-28 13:47:02 +00:00
parent 95019e5c16
commit 6060ceb9eb
3 changed files with 3 additions and 4 deletions

View File

@ -1388,7 +1388,7 @@ static int nullErrorHandler(Display *, XErrorEvent *)
*/
QCString Client::staticWindowRole(WId w)
{
return getStringProperty(w, qt_window_role);
return getStringProperty(w, qt_window_role).lower();
}
/*!

View File

@ -853,7 +853,7 @@ void Client::propertyNotifyEvent( XPropertyEvent* e )
else if (e->atom == atoms->wm_client_leader )
getWmClientLeader();
else if( e->atom == qt_window_role )
window_role = getStringProperty( window(), qt_window_role );
window_role = staticWindowRole( window());
break;
}
}

View File

@ -25,7 +25,6 @@ License. See the file "COPYING" for the exact licensing terms.
#include "rules.h"
extern Time qt_x_time;
extern Atom qt_window_role;
namespace KWinInternal
{
@ -106,7 +105,7 @@ bool Client::manage( Window w, bool isMapped )
}
ignore_focus_stealing = options->checkIgnoreFocusStealing( this ); // TODO change to rules
window_role = getStringProperty( w, qt_window_role );
window_role = staticWindowRole( w );
// first only read the caption text, so that setupWindowRules() can use it for matching,
// and only then really set the caption using setCaption(), which checks for duplicates etc.
// and also relies on rules already existing