Re: WM_CLASS purpose?

Thomas Lübking thomas.luebking at
Tue Oct 30 11:47:18 PDT 2012

On Dienstag, 30. Oktober 2012 19:14:49 CEST, Vladimir A. Pavlov wrote:
>>>>> For example, let's suppose I have a window manager
>>>>> somebox that has taskbar, dock, menus for starting
>>>>> applications/switching workspaces and configuration dialogs.
>>>>> What should be res_name/res_class for each of them?
>>>> An X client should have a single name and class. You shouldn't use
>>>> different values for different windows within a single client
>>>> (however, it's possible for a single process to contain multiple
>>>> clients by calling XtOpenApplication() multiple times; each "client"
>>>> has a separate X connection and XtAppContext).
>>> So, if _you_ write a window manager "somebox" what values would
>>> you use for res_name and res_class in the above example?
>> The default class would be "SomeBox" while the default name would be
>> the base name (everything after the last "/") of argv[0], which would
>> typically be "somebox". These could be overridden by the -class and
>> -name switches respectively.
> Do I correctly understand that all the windows mentioned above
> (taskbar, dock, menus, dialogs) would have the same class
> somebox/SomeBox so it wouldn't be possible to use WM_CLASS to
> distinguish between e.g. taskbar and menu?

Yes, WM_CLASS is usually the executable string ("xterm") while WM_NAME is the caption ("iBash" - yeah, stupid wordplay)

NETWM defines a couple of "_NET_WM_WINDOW_TYPE"s and what you're most likely looking for is WM_WINDOW_ROLE


> _______________________________________________
> xorg at X.Org support
> Archives:
> Info:
> Your subscription address: thomas.luebking at

More information about the xorg mailing list