When does XGetCommand(.) work???

Jochen Baier Jochen.Baier at stud.uni-karlsruhe.de
Fri Jun 3 16:14:41 PDT 2005


Thomas Lübking wrote:

>I'm trying to query argv[0]  by WId (on user interaction, selecting window 
>similar to xwininfo)
>However this does not work in many cases (it does for e.g. xterm or juk, but 
>not for konsole, OOo, kwrite, gnome-ding, ...), returned Status is 0.
>  
>
hi,

XGetCommand  reads the WM_COMMAND property (check with xprop)
but it seems to be obsolete (http://tronche.com/gui/x/icccm/sec-C.html)
if WM_COMMAND is not set, 0 will be returned.

>XGetClassHint(.) however works everytime, while unfortunately the first char 
>of res_class seems to be upcased, so i cannot detect argv[0] case correct (i 
>could assume that the first char needs to be lowercased, but  hope for a 
>better way)
>  
>
every program do what ever it want to do with this two strings ;)
(but probably shouldn't)

maybe you can look on the code from http://autopackage.org/docs/binreloc/
but i do not know if this is usefull for you.

regards jochen




More information about the xorg mailing list