[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: windowClass : where is that string defined ?
From:       Thomas =?iso-8859-15?q?L=FCbking?= <thomas.luebking () gmail ! com>
Date:       2010-12-28 16:07:42
Message-ID: 201012281707.42374.thomas.luebking () gmail ! com
[Download RAW message or body]

Am Tuesday 28 December 2010 schrieb Frederic Janssens:
> Where, by which way, and by whom is the windowClass string defined ?
the content is set by the client as a property  on its windows (do: "xprop | 
grep -i class" and pick a window)
 
> It is the only way I have found to get the application name from the
> windowId.
semi - you could do a process lookup from the "_NET_WM_PID" property (but it's 
optional and not set by all clients) and (on linux!) check /proc/$PID/cmdline

> windowClass often contains the application name, but not always.
yes, esp. firefox is great because it sets some "random" name with every major 
release (and sometimes minors as well ...)

> The content format/convention is inconsistent (very variable).
> To have a consistent mapping, I whould have to build a table.
> To build that table I need to know where it is defined, for all installed
> applications.
nowhere, the client process sets it at runtime (as often as it feels like), 
could be "Rumpelstiltskin" for the next firefox =)

On X11 there's no strong connection between "windows" and "processes", the 
only _really_ (if present) reliable link is the _NET_WM_PID lookup.

What precisely do you want to do?
(maybe i've done that before ;-)

Thomas
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic