desktop: force GDK_BACKEND=x11 to keep tray icon working on Wayland (closes #410) - #474
Merged
mrjimenez merged 1 commit intoApr 24, 2026
Conversation
Fixes amule-project#410. aMule's tray icon uses wxWidgets' legacy XEmbed path (wxTaskBarIcon / CMuleTrayIcon), which does not surface on Wayland sessions — Wayland compositors don't host XEmbed clients, so the icon silently disappears on GNOME + AyatanaIndicator/appindicator extension and on KDE Plasma. Until wxWidgets (or aMule) grows a libayatana-appindicator-based tray implementation, the pragmatic fix is to launch through XWayland: env GDK_BACKEND=x11 forces GTK onto the X11 backend, which composes with XEmbed correctly. Every major distro ships XWayland by default (confirmed on Gentoo by pacho2 in amule-project#410), so the fallback is available without user action. Both .desktop files are patched: the tray icon is created in CamuleDlg::CreateSystray() which is compiled into both the monolithic amule and the remote amulegui (not gated by CLIENT_GUI), so both entry points need the same treatment. Trade-offs: on a Wayland host without XWayland, amule fails to launch from the application menu — rare and self-inflicted. On HiDPI Wayland displays the X11 path loses fractional scaling, but that's a minor visual difference set against the tray icon actually working. Launching from a terminal is unaffected.
got3nks
added a commit
to got3nks/amule
that referenced
this pull request
May 1, 2026
The proper follow-up to amule-project#474, which deliberately punted the libayatana-appindicator port as "out of scope, future follow-up" and shipped `Exec=env GDK_BACKEND=x11 amule` as the XEmbed-via-XWayland workaround for amule-project#410. Two related Linux-icon problems with one canonical fix. == Dock / launcher icon == wxGTK 3.2 + GTK3 on Wayland derives the wl_app_id from g_get_prgname(), which defaults to argv[0]. That diverges across packaging formats: AppImage's argv[0] is "aMule", distro packages use "amule", Flatpak renames the .desktop entirely. The compositor matches wl_app_id against the .desktop filename to bind windows to the launcher icon — without a deterministic value the icon is generic on every Wayland desktop. Fix: standardise on the canonical AppStream id `org.amule.aMule` — matching the .desktop filename, the Wayland app_id (set explicitly via g_set_prgname in CamuleApp::OnInit), the AppStream component id, and the macOS bundle id. Drops the legacy `Exec=env GDK_BACKEND=x11 amule` fallback from the .desktop files (amule-project#474). == System tray icon == aMule's tray feature uses wxTaskBarIcon, which on wxGTK 3.2 (and 3.3 — checked) talks the legacy GtkStatusIcon API. GNOME Shell removed the legacy notification area in 3.26 and wlroots compositors never implemented it, so the icon is silently invisible on Fedora / vanilla GNOME / Sway / Hyprland. Ubuntu's GNOME Shell extension renders both legacy and SNI; that's why the existing path appears to work on Ubuntu but breaks elsewhere. Fix: add a StatusNotifierItem (SNI) backend in MuleTrayIcon via libayatana-appindicator3, gated on a configure-time pkg-config check. When the dep is present (Linux), tray icon switches to the SNI path with feature parity (full menu including live download/upload speed, client info submenu, upload/download speed presets, connect/disconnect /show/hide/exit). Menu rebuilds every 2s for live values. When the dep is missing the legacy wxTaskBarIcon path is preserved unchanged. Windows / macOS keep the existing wxTaskBarIcon → native shell behaviour with zero changes. == Dependencies == * New mandatory dep: glib-2.0 dev headers (Linux GUI build only). `g_set_prgname()` is needed to bind wl_app_id, and wxWidgets has no equivalent: `wxApp::SetAppName/SetClassName` are X11-only and deprecated, no wx method propagates to the Wayland surface. wxGTK transitively depends on glib but distro packaging doesn't always pull the dev headers as a hard dep, so we add an explicit `libglib2.0-dev` apt entry to ccpp.yml. The `g_set_prgname` call is wrapped in `#ifdef __WXGTK__` so Windows / macOS builds skip both the include and the call entirely — they don't need glib. * New optional dep: libayatana-appindicator3 (Linux only). When found at configure time, enables the SNI tray backend. When missing, falls back to wxTaskBarIcon. Configure log reports which backend is in use. == Files renamed == - amule.desktop -> org.amule.aMule.desktop - amulegui.desktop -> org.amule.aMule.gui.desktop - amule.png -> org.amule.aMule.png - org.amule.amule.metainfo.xml -> org.amule.aMule.metainfo.xml (also bumps `<id>` to `org.amule.aMule`) == Backwards compatibility == - Distro packagers: any .deb/.rpm referencing /usr/share/applications/ amule.desktop has to update the path. One-line packaging change. - AppStream catalog id changed (org.amule.amule -> org.amule.aMule). Software catalogues see this as a single new id. - `wxApp::SetAppName("aMule")` is unchanged, so config-dir paths (~/.aMule/) are unaffected. User configs migrate without action. Closes amule-project#410 properly, supersedes the GDK_BACKEND=x11 workaround shipped in amule-project#474.
got3nks
added a commit
to got3nks/amule
that referenced
this pull request
May 1, 2026
The proper follow-up to amule-project#474, which deliberately punted the libayatana-appindicator port as "out of scope, future follow-up" and shipped `Exec=env GDK_BACKEND=x11 amule` as the XEmbed-via-XWayland workaround for amule-project#410. Two related Linux-icon problems with one canonical fix. == Dock / launcher icon == wxGTK 3.2 + GTK3 on Wayland derives the wl_app_id from g_get_prgname(), which defaults to argv[0]. That diverges across packaging formats: AppImage's argv[0] is "aMule", distro packages use "amule", Flatpak renames the .desktop entirely. The compositor matches wl_app_id against the .desktop filename to bind windows to the launcher icon — without a deterministic value the icon is generic on every Wayland desktop. Fix: standardise on the canonical AppStream id `org.amule.aMule` — matching the .desktop filename, the Wayland app_id (set explicitly via g_set_prgname in CamuleApp::OnInit), the AppStream component id, and the macOS bundle id. Drops the legacy `Exec=env GDK_BACKEND=x11 amule` fallback from the .desktop files (amule-project#474). == System tray icon == aMule's tray feature uses wxTaskBarIcon, which on wxGTK 3.2 (and 3.3 — checked) talks the legacy GtkStatusIcon API. GNOME Shell removed the legacy notification area in 3.26 and wlroots compositors never implemented it, so the icon is silently invisible on Fedora / vanilla GNOME / Sway / Hyprland. Ubuntu's GNOME Shell extension renders both legacy and SNI; that's why the existing path appears to work on Ubuntu but breaks elsewhere. Fix: add a StatusNotifierItem (SNI) backend in MuleTrayIcon via libayatana-appindicator3, gated on a configure-time pkg-config check. When the dep is present (Linux), tray icon switches to the SNI path with feature parity (full menu including live download/upload speed, client info submenu, upload/download speed presets, connect/disconnect /show/hide/exit). Menu rebuilds every 2s for live values. When the dep is missing the legacy wxTaskBarIcon path is preserved unchanged. Windows / macOS keep the existing wxTaskBarIcon → native shell behaviour with zero changes. == Dependencies == * New mandatory dep: glib-2.0 dev headers (Linux GUI build only). `g_set_prgname()` is needed to bind wl_app_id, and wxWidgets has no equivalent: `wxApp::SetAppName/SetClassName` are X11-only and deprecated, no wx method propagates to the Wayland surface. wxGTK transitively depends on glib but distro packaging doesn't always pull the dev headers as a hard dep, so we add an explicit `libglib2.0-dev` apt entry to ccpp.yml. The `g_set_prgname` call is wrapped in `#ifdef __WXGTK__` so Windows / macOS builds skip both the include and the call entirely — they don't need glib. * New optional dep: libayatana-appindicator3 (Linux only). When found at configure time, enables the SNI tray backend. When missing, falls back to wxTaskBarIcon. Configure log reports which backend is in use. == Files renamed == - amule.desktop -> org.amule.aMule.desktop - amulegui.desktop -> org.amule.aMule.gui.desktop - amule.png -> org.amule.aMule.png - org.amule.amule.metainfo.xml -> org.amule.aMule.metainfo.xml (also bumps `<id>` to `org.amule.aMule`) == Backwards compatibility == - Distro packagers: any .deb/.rpm referencing /usr/share/applications/ amule.desktop has to update the path. One-line packaging change. - AppStream catalog id changed (org.amule.amule -> org.amule.aMule). Software catalogues see this as a single new id. - `wxApp::SetAppName("aMule")` is unchanged, so config-dir paths (~/.aMule/) are unaffected. User configs migrate without action. Closes amule-project#410 properly, supersedes the GDK_BACKEND=x11 workaround shipped in amule-project#474.
got3nks
added a commit
to got3nks/amule
that referenced
this pull request
May 1, 2026
The proper follow-up to amule-project#474, which deliberately punted the libayatana-appindicator port as "out of scope, future follow-up" and shipped `Exec=env GDK_BACKEND=x11 amule` as the XEmbed-via-XWayland workaround for amule-project#410. Two related Linux-icon problems with one canonical fix. == Dock / launcher icon == wxGTK 3.2 + GTK3 on Wayland derives the wl_app_id from g_get_prgname(), which defaults to argv[0]. That diverges across packaging formats: AppImage's argv[0] is "aMule", distro packages use "amule", Flatpak renames the .desktop entirely. The compositor matches wl_app_id against the .desktop filename to bind windows to the launcher icon — without a deterministic value the icon is generic on every Wayland desktop. Fix: standardise on the canonical AppStream id `org.amule.aMule` — matching the .desktop filename, the Wayland app_id (set explicitly via g_set_prgname in CamuleApp::OnInit), the AppStream component id, and the macOS bundle id. Drops the legacy `Exec=env GDK_BACKEND=x11 amule` fallback from the .desktop files (amule-project#474). == System tray icon == aMule's tray feature uses wxTaskBarIcon, which on wxGTK 3.2 (and 3.3 — checked) talks the legacy GtkStatusIcon API. GNOME Shell removed the legacy notification area in 3.26 and wlroots compositors never implemented it, so the icon is silently invisible on Fedora / vanilla GNOME / Sway / Hyprland. Ubuntu's GNOME Shell extension renders both legacy and SNI; that's why the existing path appears to work on Ubuntu but breaks elsewhere. Fix: add a StatusNotifierItem (SNI) backend in MuleTrayIcon via libayatana-appindicator3, gated on a configure-time pkg-config check. When the dep is present (Linux), tray icon switches to the SNI path with feature parity (full menu including live download/upload speed, client info submenu, upload/download speed presets, connect/disconnect /show/hide/exit). Menu rebuilds every 2s for live values. When the dep is missing the legacy wxTaskBarIcon path is preserved unchanged. Windows / macOS keep the existing wxTaskBarIcon → native shell behaviour with zero changes. == Dependencies == * New mandatory dep: glib-2.0 dev headers (Linux GUI build only). `g_set_prgname()` is needed to bind wl_app_id, and wxWidgets has no equivalent: `wxApp::SetAppName/SetClassName` are X11-only and deprecated, no wx method propagates to the Wayland surface. wxGTK transitively depends on glib but distro packaging doesn't always pull the dev headers as a hard dep, so we add an explicit `libglib2.0-dev` apt entry to ccpp.yml. The `g_set_prgname` call is wrapped in `#ifdef __WXGTK__` so Windows / macOS builds skip both the include and the call entirely — they don't need glib. * New optional dep: libayatana-appindicator3 (Linux only). When found at configure time, enables the SNI tray backend. When missing, falls back to wxTaskBarIcon. Configure log reports which backend is in use. == Files renamed == - amule.desktop -> org.amule.aMule.desktop - amulegui.desktop -> org.amule.aMule.gui.desktop - amule.png -> org.amule.aMule.png - org.amule.amule.metainfo.xml -> org.amule.aMule.metainfo.xml (also bumps `<id>` to `org.amule.aMule`) == Backwards compatibility == - Distro packagers: any .deb/.rpm referencing /usr/share/applications/ amule.desktop has to update the path. One-line packaging change. - AppStream catalog id changed (org.amule.amule -> org.amule.aMule). Software catalogues see this as a single new id. - `wxApp::SetAppName("aMule")` is unchanged, so config-dir paths (~/.aMule/) are unaffected. User configs migrate without action. Closes amule-project#410 properly, supersedes the GDK_BACKEND=x11 workaround shipped in amule-project#474.
got3nks
added a commit
to got3nks/amule
that referenced
this pull request
May 1, 2026
The proper follow-up to amule-project#474, which deliberately punted the libayatana-appindicator port as "out of scope, future follow-up" and shipped `Exec=env GDK_BACKEND=x11 amule` as the XEmbed-via-XWayland workaround for amule-project#410. Two related Linux-icon problems with one canonical fix. == Dock / launcher icon == wxGTK 3.2 + GTK3 on Wayland derives the wl_app_id from g_get_prgname(), which defaults to argv[0]. That diverges across packaging formats: AppImage's argv[0] is "aMule", distro packages use "amule", Flatpak renames the .desktop entirely. The compositor matches wl_app_id against the .desktop filename to bind windows to the launcher icon — without a deterministic value the icon is generic on every Wayland desktop. Fix: standardise on the canonical AppStream id `org.amule.aMule` — matching the .desktop filename, the Wayland app_id (set explicitly via g_set_prgname in CamuleApp::OnInit), the AppStream component id, and the macOS bundle id. Drops the legacy `Exec=env GDK_BACKEND=x11 amule` fallback from the .desktop files (amule-project#474). == System tray icon == aMule's tray feature uses wxTaskBarIcon, which on wxGTK 3.2 (and 3.3 — checked) talks the legacy GtkStatusIcon API. GNOME Shell removed the legacy notification area in 3.26 and wlroots compositors never implemented it, so the icon is silently invisible on Fedora / vanilla GNOME / Sway / Hyprland. Ubuntu's GNOME Shell extension renders both legacy and SNI; that's why the existing path appears to work on Ubuntu but breaks elsewhere. Fix: add a StatusNotifierItem (SNI) backend in MuleTrayIcon via libayatana-appindicator3, gated on a configure-time pkg-config check. When the dep is present (Linux), tray icon switches to the SNI path with feature parity (full menu including live download/upload speed, client info submenu, upload/download speed presets, connect/disconnect /show/hide/exit). Menu rebuilds every 2s for live values. When the dep is missing the legacy wxTaskBarIcon path is preserved unchanged. Windows / macOS keep the existing wxTaskBarIcon → native shell behaviour with zero changes. == Dependencies == * New mandatory dep: glib-2.0 dev headers (Linux GUI build only). `g_set_prgname()` is needed to bind wl_app_id, and wxWidgets has no equivalent: `wxApp::SetAppName/SetClassName` are X11-only and deprecated, no wx method propagates to the Wayland surface. wxGTK transitively depends on glib but distro packaging doesn't always pull the dev headers as a hard dep, so we add an explicit `libglib2.0-dev` apt entry to ccpp.yml. The `g_set_prgname` call is wrapped in `#ifdef __WXGTK__` so Windows / macOS builds skip both the include and the call entirely — they don't need glib. * New optional dep: libayatana-appindicator3 (Linux only). When found at configure time, enables the SNI tray backend. When missing, falls back to wxTaskBarIcon. Configure log reports which backend is in use. == Files renamed == - amule.desktop -> org.amule.aMule.desktop - amulegui.desktop -> org.amule.aMule.gui.desktop - amule.png -> org.amule.aMule.png - org.amule.amule.metainfo.xml -> org.amule.aMule.metainfo.xml (also bumps `<id>` to `org.amule.aMule`) == Backwards compatibility == - Distro packagers: any .deb/.rpm referencing /usr/share/applications/ amule.desktop has to update the path. One-line packaging change. - AppStream catalog id changed (org.amule.amule -> org.amule.aMule). Software catalogues see this as a single new id. - `wxApp::SetAppName("aMule")` is unchanged, so config-dir paths (~/.aMule/) are unaffected. User configs migrate without action. Closes amule-project#410 properly, supersedes the GDK_BACKEND=x11 workaround shipped in amule-project#474.
Merged
4 tasks
got3nks
added a commit
to got3nks/amule
that referenced
this pull request
May 1, 2026
The proper follow-up to amule-project#474, which deliberately punted the libayatana-appindicator port as "out of scope, future follow-up" and shipped `Exec=env GDK_BACKEND=x11 amule` as the XEmbed-via-XWayland workaround for amule-project#410. Two related Linux-icon problems with one canonical fix. == Dock / launcher icon == wxGTK 3.2 + GTK3 on Wayland derives the wl_app_id from g_get_prgname(), which defaults to argv[0]. That diverges across packaging formats: AppImage's argv[0] is "aMule", distro packages use "amule", Flatpak renames the .desktop entirely. The compositor matches wl_app_id against the .desktop filename to bind windows to the launcher icon — without a deterministic value the icon is generic on every Wayland desktop. Fix: standardise on the canonical AppStream id `org.amule.aMule` — matching the .desktop filename, the Wayland app_id (set explicitly via g_set_prgname in CamuleApp::OnInit), the AppStream component id, and the macOS bundle id. Drops the legacy `Exec=env GDK_BACKEND=x11 amule` fallback from the .desktop files (amule-project#474). == System tray icon == aMule's tray feature uses wxTaskBarIcon, which on wxGTK 3.2 (and 3.3 — checked) talks the legacy GtkStatusIcon API. GNOME Shell removed the legacy notification area in 3.26 and wlroots compositors never implemented it, so the icon is silently invisible on Fedora / vanilla GNOME / Sway / Hyprland. Ubuntu's GNOME Shell extension renders both legacy and SNI; that's why the existing path appears to work on Ubuntu but breaks elsewhere. Fix: add a StatusNotifierItem (SNI) backend in MuleTrayIcon via libayatana-appindicator3, gated on a configure-time pkg-config check. When the dep is present (Linux), tray icon switches to the SNI path with feature parity (full menu including live download/upload speed, client info submenu, upload/download speed presets, connect/disconnect /show/hide/exit). Menu rebuilds every 2s for live values. When the dep is missing the legacy wxTaskBarIcon path is preserved unchanged. Windows / macOS keep the existing wxTaskBarIcon → native shell behaviour with zero changes. == Dependencies == * New mandatory dep: glib-2.0 dev headers (Linux GUI build only). `g_set_prgname()` is needed to bind wl_app_id, and wxWidgets has no equivalent: `wxApp::SetAppName/SetClassName` are X11-only and deprecated, no wx method propagates to the Wayland surface. wxGTK transitively depends on glib but distro packaging doesn't always pull the dev headers as a hard dep, so we add an explicit `libglib2.0-dev` apt entry to ccpp.yml. The `g_set_prgname` call is wrapped in `#ifdef __WXGTK__` so Windows / macOS builds skip both the include and the call entirely — they don't need glib. * New optional dep: libayatana-appindicator3 (Linux only). When found at configure time, enables the SNI tray backend. When missing, falls back to wxTaskBarIcon. Configure log reports which backend is in use. == Files renamed == - amule.desktop -> org.amule.aMule.desktop - amulegui.desktop -> org.amule.aMule.gui.desktop - amule.png -> org.amule.aMule.png - org.amule.amule.metainfo.xml -> org.amule.aMule.metainfo.xml (also bumps `<id>` to `org.amule.aMule`) == Backwards compatibility == - Distro packagers: any .deb/.rpm referencing /usr/share/applications/ amule.desktop has to update the path. One-line packaging change. - AppStream catalog id changed (org.amule.amule -> org.amule.aMule). Software catalogues see this as a single new id. - `wxApp::SetAppName("aMule")` is unchanged, so config-dir paths (~/.aMule/) are unaffected. User configs migrate without action. Closes amule-project#410 properly, supersedes the GDK_BACKEND=x11 workaround shipped in amule-project#474.
got3nks
added a commit
to got3nks/amule
that referenced
this pull request
May 1, 2026
The proper follow-up to amule-project#474, which deliberately punted the libayatana-appindicator port as "out of scope, future follow-up" and shipped `Exec=env GDK_BACKEND=x11 amule` as the XEmbed-via-XWayland workaround for amule-project#410. Two related Linux-icon problems with one canonical fix. == Dock / launcher icon == wxGTK 3.2 + GTK3 on Wayland derives the wl_app_id from g_get_prgname(), which defaults to argv[0]. That diverges across packaging formats: AppImage's argv[0] is "aMule", distro packages use "amule", Flatpak renames the .desktop entirely. The compositor matches wl_app_id against the .desktop filename to bind windows to the launcher icon — without a deterministic value the icon is generic on every Wayland desktop. Fix: standardise on the canonical AppStream id `org.amule.aMule` — matching the .desktop filename, the Wayland app_id (set explicitly via g_set_prgname in CamuleApp::OnInit), the AppStream component id, and the macOS bundle id. Drops the legacy `Exec=env GDK_BACKEND=x11 amule` fallback from the .desktop files (amule-project#474). == System tray icon == aMule's tray feature uses wxTaskBarIcon, which on wxGTK 3.2 (and 3.3 — checked) talks the legacy GtkStatusIcon API. GNOME Shell removed the legacy notification area in 3.26 and wlroots compositors never implemented it, so the icon is silently invisible on Fedora / vanilla GNOME / Sway / Hyprland. Ubuntu's GNOME Shell extension renders both legacy and SNI; that's why the existing path appears to work on Ubuntu but breaks elsewhere. Fix: add a StatusNotifierItem (SNI) backend in MuleTrayIcon via libayatana-appindicator3, gated on a configure-time pkg-config check. When the dep is present (Linux), tray icon switches to the SNI path with feature parity (full menu including live download/upload speed, client info submenu, upload/download speed presets, connect/disconnect /show/hide/exit). Menu rebuilds every 2s for live values. When the dep is missing the legacy wxTaskBarIcon path is preserved unchanged. Windows / macOS keep the existing wxTaskBarIcon → native shell behaviour with zero changes. == Dependencies == * New mandatory dep: glib-2.0 dev headers (Linux GUI build only). `g_set_prgname()` is needed to bind wl_app_id, and wxWidgets has no equivalent: `wxApp::SetAppName/SetClassName` are X11-only and deprecated, no wx method propagates to the Wayland surface. wxGTK transitively depends on glib but distro packaging doesn't always pull the dev headers as a hard dep, so we add an explicit `libglib2.0-dev` apt entry to ccpp.yml. The `g_set_prgname` call is wrapped in `#ifdef __WXGTK__` so Windows / macOS builds skip both the include and the call entirely — they don't need glib. * New optional dep: libayatana-appindicator3 (Linux only). When found at configure time, enables the SNI tray backend. When missing, falls back to wxTaskBarIcon. Configure log reports which backend is in use. == Files renamed == - amule.desktop -> org.amule.aMule.desktop - amulegui.desktop -> org.amule.aMule.gui.desktop - amule.png -> org.amule.aMule.png - org.amule.amule.metainfo.xml -> org.amule.aMule.metainfo.xml (also bumps `<id>` to `org.amule.aMule`) == Backwards compatibility == - Distro packagers: any .deb/.rpm referencing /usr/share/applications/ amule.desktop has to update the path. One-line packaging change. - AppStream catalog id changed (org.amule.amule -> org.amule.aMule). Software catalogues see this as a single new id. - `wxApp::SetAppName("aMule")` is unchanged, so config-dir paths (~/.aMule/) are unaffected. User configs migrate without action. Closes amule-project#410 properly, supersedes the GDK_BACKEND=x11 workaround shipped in amule-project#474.
got3nks
added a commit
to got3nks/amule
that referenced
this pull request
May 1, 2026
The proper follow-up to amule-project#474, which deliberately punted the libayatana-appindicator port as "out of scope, future follow-up" and shipped `Exec=env GDK_BACKEND=x11 amule` as the XEmbed-via-XWayland workaround for amule-project#410. Two related Linux-icon problems with one canonical fix. == Dock / launcher icon == wxGTK 3.2 + GTK3 on Wayland derives the wl_app_id from g_get_prgname(), which defaults to argv[0]. That diverges across packaging formats: AppImage's argv[0] is "aMule", distro packages use "amule", Flatpak renames the .desktop entirely. The compositor matches wl_app_id against the .desktop filename to bind windows to the launcher icon — without a deterministic value the icon is generic on every Wayland desktop. Fix: standardise on the canonical AppStream id `org.amule.aMule` — matching the .desktop filename, the Wayland app_id (set explicitly via g_set_prgname in CamuleApp::OnInit), the AppStream component id, and the macOS bundle id. Drops the legacy `Exec=env GDK_BACKEND=x11 amule` fallback from the .desktop files (amule-project#474). == System tray icon == aMule's tray feature uses wxTaskBarIcon, which on wxGTK 3.2 (and 3.3 — checked) talks the legacy GtkStatusIcon API. GNOME Shell removed the legacy notification area in 3.26 and wlroots compositors never implemented it, so the icon is silently invisible on Fedora / vanilla GNOME / Sway / Hyprland. Ubuntu's GNOME Shell extension renders both legacy and SNI; that's why the existing path appears to work on Ubuntu but breaks elsewhere. Fix: add a StatusNotifierItem (SNI) backend in MuleTrayIcon via libayatana-appindicator3, gated on a configure-time pkg-config check. When the dep is present (Linux), tray icon switches to the SNI path with feature parity (full menu including live download/upload speed, client info submenu, upload/download speed presets, connect/disconnect /show/hide/exit). Menu rebuilds every 2s for live values. When the dep is missing the legacy wxTaskBarIcon path is preserved unchanged. Windows / macOS keep the existing wxTaskBarIcon → native shell behaviour with zero changes. == Dependencies == * New mandatory dep: glib-2.0 dev headers (Linux GUI build only). `g_set_prgname()` is needed to bind wl_app_id, and wxWidgets has no equivalent: `wxApp::SetAppName/SetClassName` are X11-only and deprecated, no wx method propagates to the Wayland surface. wxGTK transitively depends on glib but distro packaging doesn't always pull the dev headers as a hard dep, so we add an explicit `libglib2.0-dev` apt entry to ccpp.yml. The `g_set_prgname` call is wrapped in `#ifdef __WXGTK__` so Windows / macOS builds skip both the include and the call entirely — they don't need glib. * New optional dep: libayatana-appindicator3 (Linux only). When found at configure time, enables the SNI tray backend. When missing, falls back to wxTaskBarIcon. Configure log reports which backend is in use. == Files renamed == - amule.desktop -> org.amule.aMule.desktop - amulegui.desktop -> org.amule.aMule.gui.desktop - amule.png -> org.amule.aMule.png - org.amule.amule.metainfo.xml -> org.amule.aMule.metainfo.xml (also bumps `<id>` to `org.amule.aMule`) == Backwards compatibility == - Distro packagers: any .deb/.rpm referencing /usr/share/applications/ amule.desktop has to update the path. One-line packaging change. - AppStream catalog id changed (org.amule.amule -> org.amule.aMule). Software catalogues see this as a single new id. - `wxApp::SetAppName("aMule")` is unchanged, so config-dir paths (~/.aMule/) are unaffected. User configs migrate without action. Closes amule-project#410 properly, supersedes the GDK_BACKEND=x11 workaround shipped in amule-project#474.
mrjimenez
pushed a commit
that referenced
this pull request
May 2, 2026
The proper follow-up to #474, which deliberately punted the libayatana-appindicator port as "out of scope, future follow-up" and shipped `Exec=env GDK_BACKEND=x11 amule` as the XEmbed-via-XWayland workaround for #410. Two related Linux-icon problems with one canonical fix. == Dock / launcher icon == wxGTK 3.2 + GTK3 on Wayland derives the wl_app_id from g_get_prgname(), which defaults to argv[0]. That diverges across packaging formats: AppImage's argv[0] is "aMule", distro packages use "amule", Flatpak renames the .desktop entirely. The compositor matches wl_app_id against the .desktop filename to bind windows to the launcher icon — without a deterministic value the icon is generic on every Wayland desktop. Fix: standardise on the canonical AppStream id `org.amule.aMule` — matching the .desktop filename, the Wayland app_id (set explicitly via g_set_prgname in CamuleApp::OnInit), the AppStream component id, and the macOS bundle id. Drops the legacy `Exec=env GDK_BACKEND=x11 amule` fallback from the .desktop files (#474). == System tray icon == aMule's tray feature uses wxTaskBarIcon, which on wxGTK 3.2 (and 3.3 — checked) talks the legacy GtkStatusIcon API. GNOME Shell removed the legacy notification area in 3.26 and wlroots compositors never implemented it, so the icon is silently invisible on Fedora / vanilla GNOME / Sway / Hyprland. Ubuntu's GNOME Shell extension renders both legacy and SNI; that's why the existing path appears to work on Ubuntu but breaks elsewhere. Fix: add a StatusNotifierItem (SNI) backend in MuleTrayIcon via libayatana-appindicator3, gated on a configure-time pkg-config check. When the dep is present (Linux), tray icon switches to the SNI path with feature parity (full menu including live download/upload speed, client info submenu, upload/download speed presets, connect/disconnect /show/hide/exit). Menu rebuilds every 2s for live values. When the dep is missing the legacy wxTaskBarIcon path is preserved unchanged. Windows / macOS keep the existing wxTaskBarIcon → native shell behaviour with zero changes. == Dependencies == * New mandatory dep: glib-2.0 dev headers (Linux GUI build only). `g_set_prgname()` is needed to bind wl_app_id, and wxWidgets has no equivalent: `wxApp::SetAppName/SetClassName` are X11-only and deprecated, no wx method propagates to the Wayland surface. wxGTK transitively depends on glib but distro packaging doesn't always pull the dev headers as a hard dep, so we add an explicit `libglib2.0-dev` apt entry to ccpp.yml. The `g_set_prgname` call is wrapped in `#ifdef __WXGTK__` so Windows / macOS builds skip both the include and the call entirely — they don't need glib. * New optional dep: libayatana-appindicator3 (Linux only). When found at configure time, enables the SNI tray backend. When missing, falls back to wxTaskBarIcon. Configure log reports which backend is in use. == Files renamed == - amule.desktop -> org.amule.aMule.desktop - amulegui.desktop -> org.amule.aMule.gui.desktop - amule.png -> org.amule.aMule.png - org.amule.amule.metainfo.xml -> org.amule.aMule.metainfo.xml (also bumps `<id>` to `org.amule.aMule`) == Backwards compatibility == - Distro packagers: any .deb/.rpm referencing /usr/share/applications/ amule.desktop has to update the path. One-line packaging change. - AppStream catalog id changed (org.amule.amule -> org.amule.aMule). Software catalogues see this as a single new id. - `wxApp::SetAppName("aMule")` is unchanged, so config-dir paths (~/.aMule/) are unaffected. User configs migrate without action. Closes #410 properly, supersedes the GDK_BACKEND=x11 workaround shipped in #474.
ngosang
added a commit
to ngosang/amule
that referenced
this pull request
Jul 13, 2026
…mule-project#474) Surface the file comments & ratings REST feature (issue amule-project#419/amule-project#434) in the Downloads and Shared Files detail panels, and restructure those panels into a cleaner notebook layout. Comments: - New 'Comments' tab in both detail panels. Downloads shows the per-source comments/ratings list (username, rating, filename, comment, incl. retrieved Kad notes) from GET /downloads/{hash}/comments, a 'Get from Kad' trigger (POST) with a searching indicator, and an edit-your-own comment+rating form. Shared shows the edit form only (no live source list). - Rating renders as text labels matching the desktop GetRateString() scale (0 Not rated .. 5 Excellent, -1 = comment only), colour-accented, not stars. - The editor (shared CommentEditor component) is admin-only and, on Downloads, disabled until the file has >=1 complete part (the daemon only accepts a comment/rating on a shared file; otherwise PATCH 409 not_shared), with an inline hint. - The Comments tab does not poll GET /downloads/{hash}; live detail polling is gated to the Details tab. Detail-panel layout: - SplitDetail lifted to the page level so the layout is table container -> splitter -> detail container as siblings, the detail no longer nested in the table's box. - The panel is a notebook: file title + close button sit free at the top, the Details/Comments tab strip below, and only the active tab's content is boxed (.detail-body) and scrolls internally while the head + tabs stay fixed. - Detail body spans the panel's full width (flush with the list container). - Progress bar + pieces map moved into the Details tab. - Copy ED2K / Copy magnet buttons moved into the Details tab's Hash row. - Tighter header spacing and close-button alignment. New en/es i18n keys and CSS included.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aMule's tray icon uses wxWidgets' legacy XEmbed path (
wxTaskBarIcon/CMuleTrayIcon), which does not surface on Wayland sessions — Wayland compositors don't host XEmbed clients, so the icon silently disappears on GNOME +gnome-shell-extension-appindicatorand on KDE Plasma.Until wxWidgets (or aMule) grows a
libayatana-appindicator-based tray implementation, the pragmatic fix is to launch through XWayland:env GDK_BACKEND=x11forces GTK onto the X11 backend, which composes with XEmbed correctly. Every major distro ships XWayland by default (Gentoo confirmed by @pacho2 in #410).Closes #410.
Scope
Two
.desktopfiles patched:amule.desktop— monolithic aMule.amulegui.desktop— the remote GUI.CamuleDlg::CreateSystray()(insrc/amuleDlg.cpp) is compiled into both binaries (not gated byCLIENT_GUI), so both expose the same tray icon and need the same launch-path fix.Trade-offs
GDK_BACKEND=x11is already the default.xwaylandpackage). Launch from a terminal is unaffected because that path doesn't go through the.desktopfile..desktopfiles are Linux-only, zero impact.Future follow-up
A proper fix would be a
libayatana-appindicatorport ofCMuleTrayIcon(out of scope for this PR); at that point the XWayland workaround can be removed.