Bugfix: Use both parts of WM_CLASS (it contains instance and class) (Thanks fallen)

Actually, WM_CLASS contains two null-terminated strings, so we cannot
use asprintf() to get its value but rather use strdup() to get both
of them. Both values are compared when a client is matched against
a wm_class/title combination (for assignments for example).
This commit is contained in:
Michael Stapelberg
2010-02-12 12:12:25 +01:00
parent 9568836e12
commit 0b6b8e8380
4 changed files with 25 additions and 23 deletions

View File

@ -382,8 +382,10 @@ struct Client {
* in. If set to true, legacy window names are ignored. */
bool uses_net_wm_name;
/** Holds the WM_CLASS, useful for matching the client in commands */
char *window_class;
/** Holds the WM_CLASS (which consists of two strings, the instance
* and the class), useful for matching the client in commands */
char *window_class_instance;
char *window_class_class;
/** Holds the clients mark, for vim-like jumping */
char *mark;