Linux: show taskbar unread badge on KDE / non-Unity desktops#2756
Linux: show taskbar unread badge on KDE / non-Unity desktops#2756WebDevBar wants to merge 3 commits into
Conversation
|
Ahh this is super interesting, thanks for contributing this fix! I had Claude go off and read a bunch of forums, etc. to make sure this is a standard approach and it found the same mechanism in use in KMail, Geary, and Qt Creator, so we're definitely good there. Kind of surprising this hasn't been merged into Electron upstream, I had no idea It looks like the I think we can pull in a single utility from |
Problem
On Linux the unread badge is set via
app.setBadgeCount(), which relies on libunity. libunity ships on Ubuntu/Unity but not on Fedora/KDE/openSUSE, so the taskbar badge silently does nothing there (see #1890, #1042, and others).Fix
In the existing
set-badge-valuemain-process handler, on Linux also emit the rawcom.canonical.Unity.LauncherEntryUpdatesignal over the session bus (via the pure-JSdbus-next), keyed toapplication://Mailspring.desktop. This is the same mechanism KMail/Geary use natively and works on KDE/GNOME/etc. without libunity.errorevent is handled, so a bus failure never crashes the app.app.dock.setBadge) and Windows overlay paths are untouched.Notes
dbus-next(pure JS, no native build).app/spec/linux-launcher-entry-spec.ts.dbus-monitorshows theUpdatesignal carrying the correctcount/count-visible.Addresses the KDE/non-Unity half of #1890 and #1042.