mate-desktop / mate-panel

MATE panel
https://mate-desktop.org
GNU General Public License v2.0
185 stars 118 forks source link

Where does Mate "Window List" get the summary application name from? #1449

Closed Betterbird closed 4 months ago

Betterbird commented 4 months ago

I'm the maintainer of Betterbird. On Mate, when grouping windows in the Windows list, this is displayed: image

Can you please let us know where the "Thunderbird" string is taken from.

xprop shows no Thunderbird:

WM_CLIENT_MACHINE(STRING) = "betterbird-vm"
WM_CLASS(STRING) = "Mail", "betterbird"
WM_ICON_NAME(STRING) = "Inbox - Unified Folders - Betterbird"
_NET_WM_ICON_NAME(UTF8_STRING) = "Inbox - Unified Folders - Betterbird"
WM_NAME(STRING) = "Inbox - Unified Folders - Betterbird"
_NET_WM_NAME(UTF8_STRING) = "Inbox - Unified Folders - Betterbird"

Original complaint here: https://www.reddit.com/r/Betterbird/comments/1e6k2xj/comment/leeo4w7/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

balazs-endresz commented 4 months ago

I think those tooltips are handled by libwnck: https://gitlab.gnome.org/GNOME/libwnck/-/blob/master/libwnck/tasklist.c#L3806 This sounds relevant too: https://gitlab.gnome.org/GNOME/libwnck/-/blob/master/libwnck/class-group.c#L666-672

Betterbird commented 4 months ago

Hmm, this is twisted, they use wnck_application_get_name() and wnck_window_get_name(): https://gitlab.gnome.org/GNOME/libwnck/-/blob/master/libwnck/class-group.c#L288 https://gitlab.gnome.org/GNOME/libwnck/-/blob/master/libwnck/class-group.c#L325 The former is here: https://gitlab.gnome.org/GNOME/libwnck/-/blob/master/libwnck/application.c#L261 and the latter is here: https://gitlab.gnome.org/GNOME/libwnck/-/blob/master/libwnck/window.c#L617 In both cases the name is obtained from ->priv->name.

For example here https://searchfox.org/mozilla-central/rev/de46cd99a7d1634058b511a3f546a970763e5048/widget/gtk/nsWindow.cpp#6396 the window is given a name from gAppData->name, and that is Thunderbird for internal reasons. We'll check out this and other call sites to change the string where required.

UPDATE: The offending code is here: https://searchfox.org/mozilla-central/rev/de46cd99a7d1634058b511a3f546a970763e5048/toolkit/xre/nsAppRunner.cpp#4843

Thanks for the pointer!