Skip to content

Libwnck broke task list sorting somewhere between versions 43.0 and 43.2

I'm struggling to describe the bug properly so please bear with me. XFCE has a panel with a task list (Window Buttons) which I've configured to use the sort order "Group title and window title". I'm not entirely sure what "Group" refers to but I assume it's something similar to the WM_CLASS string of a window. Sorting like this is the most predictable way since all my regular programs are sorted the same way all the time.

However, today the sort order was completely messed up. Some programs are now being sorted by their title alone. For example Konversation's position in the list jumps between first and last depending on the window title it sets for itself. The title "#chat - Konversation" is sorted first due to the "#" character while "znc - Konversation" is sorted last due to the "z" character. Not all windows are affected. Firefox always maintains the same position in the task list, even when its window title changes. Since Firefox is not affected, but Konversation and Konsole are, I suspect this might be a GTK vs. QT issue but I haven't confirmed this.

I've determined that this is a regression introduced in the upgrade from libwnck-43.0 to 43.2 that happened yesterday on Gentoo stable. Downgrading to libwnck-43.0 restores the old behavior. Normally I would bisect regressions like this but Gentoo doesn't provide a Git version of libwnck, so I would have to build and bisect it manually. There aren't many commits to review and I suspect that one of the following commits introduced the problem. Both commits were added in version 43.1.

commit b416f9b3465e90a68c4961778622bb7b3278d19c
Author: Alberts Muktupāvels <alberts.muktupavels@gmail.com>
Date:   Sun Oct 9 23:17:30 2022 +0300

    application: use res_class as app name when group is not set

commit ad69fe45d7692319ead0d9d98b23b30071262a9e
Author: Alberts Muktupāvels <alberts.muktupavels@gmail.com>
Date:   Sun Oct 9 22:35:54 2022 +0300

    screen: fallback to WM_CLASS when window group is not provided

    If application/window does not provide window group use WM_CLASS
    to consider if window belongs to the same application.

    https://gitlab.gnome.org/GNOME/libwnck/-/issues/146

I wasn't sure where to report this issue as it appears to be a regression in libwnck rather than in XFCE itself. Libwnck seems to be a GNOME project that is also utilized by XFCE but the developers may not be interested in addressing XFCE-specific bugs.

Versions (Gentoo stable): xfce4-panel-4.20.4 firefox-128.12.0 konversation-24.12.3 konsole-24.12.3 xorg-server-21.1.18