Skip to content

Draft: Use proper WM_CLASS for grouping

Actually the fix was pretty easy. The problem was that the following code reads only the first element which is (in X11) so called a generic class. What we need is the second element which is the instance name, and that's the string we can set in .desktop file as StartupWMClass property (and Chrome app .desktop files uses that field). Fallback for the 1st element (for example for Wayland) is kept.

// Xfw method const char *
const gchar* const* class_ids = xfw_window_get_class_ids(xfwWindow);
if (!xfce_str_is_empty(class_ids[0]))
   return class_ids[0];

It fixes more than just grouping of Chrome apps, it is also very useful for AppImage apps too. (Fixes #21)

Edited by azureblue

Merge request reports

Loading