From 6060ceb9eb8e3a07279d7a92ca5f29ef699330d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 28 Jun 2004 13:47:02 +0000 Subject: [PATCH] Keep window role as lowercase, just like wmclass, for rules matching. svn path=/trunk/kdebase/kwin/; revision=324251 --- client.cpp | 2 +- events.cpp | 2 +- manage.cpp | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/client.cpp b/client.cpp index 141cb95444..8c06e852b7 100644 --- a/client.cpp +++ b/client.cpp @@ -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(); } /*! diff --git a/events.cpp b/events.cpp index 893a81228e..edf03d0dbc 100644 --- a/events.cpp +++ b/events.cpp @@ -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; } } diff --git a/manage.cpp b/manage.cpp index 66bc8a4098..026a6637f8 100644 --- a/manage.cpp +++ b/manage.cpp @@ -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