Bug#985366: thunderbird: Incorrect StartupWMClass in desktop file

2021-03-21 Thread Carsten Schoenert
Control: tags -1 pending

Hello Colomban,

Am 16.03.21 um 19:08 schrieb Colomban Wendling:

> Attached is a simple patch that lowercases the StartupWMClass in the
> desktop file, which fixes bamfdeamon window matching and doesn't seem
> to otherwise cause issues.
> This affects e.g. mate-dock-applet as it is a bamfdeamon client.

thanks for analyzing and providing a patch.
Your contribution will get included into the next version 78.9.0.

-- 
Regards
Carsten



Bug#985366: thunderbird: Incorrect StartupWMClass in desktop file

2021-03-16 Thread Colomban Wendling
Package: thunderbird
Version: 1:78.8.0-1
Severity: normal
Tags: patch

Dear Maintainer,

The thunderbird.desktop file contains `StartupWMClass=Thunderbird`.
This is incorrect as the Thunderbird window has the WM classes
`Mail` and `thunderbird` (lowercase):

$ grep StartupWMClass /usr/share/applications/thunderbird.desktop 
StartupWMClass=Thunderbird
$ xprop WM_CLASS
[click on the Thunderbird main window]
WM_CLASS(STRING) = "Mail", "thunderbird"

This impacts some startup detection logic, and most noticeably
bamfdeamon which then fails to match windows to the right app.

Note that there *is* apparently a Thunderbird window which includes the
"Thunderbird" WM class, but that's not the main window, and it kind of
looks like a ghost window (other details are funky, including
WM_NORMAL_HINTS specifying a 10x10 window, no icons, etc.):

$ xprop -name Thunderbird WM_CLASS
WM_CLASS(STRING) = "thunderbird", "Thunderbird"

In any case, this window also includes the lowercase class, so would be
matched just as well by it.

Attached is a simple patch that lowercases the StartupWMClass in the
desktop file, which fixes bamfdeamon window matching and doesn't seem
to otherwise cause issues.
This affects e.g. mate-dock-applet as it is a bamfdeamon client.

Regards,
Colomban


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-security'), (500, 
'testing-debug'), (500, 'oldoldstable'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.9.0-1-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages thunderbird depends on:
ii  debianutils  4.11.2
ii  fontconfig   2.13.1-4.2
ii  libatk1.0-0  2.36.0-2
ii  libbotan-2-172.17.3+dfsg-3
ii  libbz2-1.0   1.0.8-4
ii  libc62.31-4
ii  libcairo-gobject21.16.0-4
ii  libcairo21.16.0-4
ii  libdbus-1-3  1.12.20-1
ii  libdbus-glib-1-2 0.110-5
ii  libevent-2.1-7   2.1.12-stable-1
ii  libffi7  3.3-5
ii  libfontconfig1   2.13.1-4.2
ii  libfreetype6 2.10.2+dfsg-4
ii  libgcc-s110.2.1-1
ii  libgdk-pixbuf-2.0-0  2.40.0+dfsg-10
ii  libglib2.0-0 2.66.2-1
ii  libgtk-3-0   3.24.23-2
ii  libicu67 67.1-4
ii  libjson-c5   0.15-1
ii  libnspr4 2:4.29-1
ii  libnss3  2:3.60-1
ii  libpango-1.0-0   1.46.2-1
ii  libstdc++6   10.2.1-1
ii  libvpx6  1.8.2-1
ii  libx11-6 2:1.7.0-2
ii  libx11-xcb1  2:1.7.0-2
ii  libxcb-shm0  1.14-2
ii  libxcb1  1.14-2
ii  libxext6 2:1.3.3-1+b2
ii  libxrender1  1:0.9.10-1
ii  psmisc   23.3-1
ii  x11-utils7.7+5
ii  zlib1g   1:1.2.11.dfsg-2

Versions of packages thunderbird recommends:
ii  hunspell-en-us [hunspell-dictionary]  1:2019.10.06-1
ii  myspell-fr-gut [myspell-dictionary]   1:1.0-32

Versions of packages thunderbird suggests:
ii  apparmor  2.13.5-1+b2
pn  fonts-lyx 
ii  libgssapi-krb5-2  1.17-10
ii  libgtk2.0-0   2.24.32-4

-- no debconf information
Fix the StartupWMClass to actually match what Thunderbird sets as WM_CLASS

--- a/debian/thunderbird.desktop
+++ b/debian/thunderbird.desktop
@@ -10,7 +10,7 @@ Version=1.0
 Icon=thunderbird
 Categories=Network;Email;News;GTK;
 MimeType=message/rfc822;x-scheme-handler/mailto;text/calendar;text/x-vcard;
-StartupWMClass=Thunderbird
+StartupWMClass=thunderbird
 StartupNotify=true
 Name[ast]=Veceru de corréu Thunderbird
 Name[ca]=Client de correu Thunderbird