To allocate an XClassHint structure, use XAllocClassHint().
typedef struct {
char *res_name;
char *res_class;
} XClassHint;
The res_name member contains the application name, and the res_class member contains the application class. Note that the name set in this property may differ from the name set as WM_NAME. That is, WM_NAME specifies what should be displayed in the title bar and, therefore, can contain temporal information (for example, the name of a file currently in an editor's buffer). On the other hand, the name specified as part of WM_CLASS is the formal name of the application that should be used when retrieving the application's resources from the resource database.
To set a window's WM_CLASS property, use XSetClassHint().
To read a window's WM_CLASS property, use XGetClassHint().