From acb8d2f539fd6e61d853d60008a618abe4e712b4 Mon Sep 17 00:00:00 2001 From: deepend Date: Sun, 22 Feb 2026 06:58:24 -0700 Subject: [PATCH 01/11] Investigated the XFCE tray issue and confirmed the code path depends on build-time AppIndicator availability: GTK3 uses AppIndicator/StatusNotifier only when Ayatana/AppIndicator headers/libs were present at compile time; otherwise it falls back to GtkStatusIcon behavior. That fallback is less reliable across XFCE setups, which explains why one user could miss the tray icon. Added a new Meson feature option appindicator (default auto) so this backend is explicitly controllable. Updated GTK Meson logic to honor -Dappindicator=... and fail fast if enabled is requested but neither ayatana-appindicator3-0.1 nor appindicator3-0.1 is found (prevents silently shipping a build without AppIndicator tray support). Updated AppImage CI configure flags to force -Dappindicator=enabled, which should prevent AppImage artifacts from lacking StatusNotifier/AppIndicator tray support in XFCE-like environments. --- .github/workflows/appimage-build.yml | 3 ++- meson_options.txt | 3 +++ src/fe-gtk/meson.build | 20 +++++++++++++------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/appimage-build.yml b/.github/workflows/appimage-build.yml index 36e49518..ded95a3b 100644 --- a/.github/workflows/appimage-build.yml +++ b/.github/workflows/appimage-build.yml @@ -47,7 +47,8 @@ jobs: -Dtext-frontend=true \ -Dwith-perl=perl \ -Dwith-python=python3 \ - -Dauto_features=enabled + -Dauto_features=enabled \ + -Dappindicator=enabled - name: Build run: | diff --git a/meson_options.txt b/meson_options.txt index faa9f665..0bdf5051 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -22,6 +22,9 @@ option('dbus', type: 'feature', value: 'auto', option('libcanberra', type: 'feature', value: 'auto', description: 'Support for sound alerts, Unix only' ) +option('appindicator', type: 'feature', value: 'auto', + description: 'Use Ayatana/AppIndicator-based tray backend when GTK3 is enabled' +) # Install options option('dbus-service-use-appid', type: 'boolean', value: false, diff --git a/src/fe-gtk/meson.build b/src/fe-gtk/meson.build index b66dfd73..65993c4e 100644 --- a/src/fe-gtk/meson.build +++ b/src/fe-gtk/meson.build @@ -40,15 +40,21 @@ if get_option('gtk3') zoitechat_gtk_cflags += '-DHAVE_GTK3' if host_machine.system() != 'windows' - appindicator_dep = dependency('ayatana-appindicator3-0.1', required: false) - if appindicator_dep.found() - zoitechat_gtk_deps += appindicator_dep - zoitechat_gtk_cflags += '-DHAVE_AYATANA_APPINDICATOR' - else - appindicator_dep = dependency('appindicator3-0.1', required: false) + appindicator_opt = get_option('appindicator') + + if appindicator_opt.allowed() + appindicator_dep = dependency('ayatana-appindicator3-0.1', required: false) if appindicator_dep.found() zoitechat_gtk_deps += appindicator_dep - zoitechat_gtk_cflags += '-DHAVE_APPINDICATOR' + zoitechat_gtk_cflags += '-DHAVE_AYATANA_APPINDICATOR' + else + appindicator_dep = dependency('appindicator3-0.1', required: false) + if appindicator_dep.found() + zoitechat_gtk_deps += appindicator_dep + zoitechat_gtk_cflags += '-DHAVE_APPINDICATOR' + elif appindicator_opt.enabled() + error('appindicator=enabled, but neither ayatana-appindicator3-0.1 nor appindicator3-0.1 was found') + endif endif endif endif From 391c4c1a24ec7bc8b6e3198b68c032772755b998 Mon Sep 17 00:00:00 2001 From: deepend Date: Sun, 22 Feb 2026 07:23:08 -0700 Subject: [PATCH 02/11] Updated the OpenBSD workflow to install the missing appindicator dependency by adding libayatana-appindicator to pkg_add, so appindicator support can remain enabled instead of being turned off. --- .github/workflows/openbsd-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/openbsd-build.yml b/.github/workflows/openbsd-build.yml index 23238adc..7e9dcc15 100644 --- a/.github/workflows/openbsd-build.yml +++ b/.github/workflows/openbsd-build.yml @@ -33,7 +33,7 @@ jobs: meson ninja pkgconf gmake \ gettext-tools \ glib2 gtk+3 dbus-glib libcanberra \ - luajit mono libgdiplus openssl + libayatana-appindicator luajit mono libgdiplus openssl work="$(mktemp -d /tmp/zoitechat.XXXXXX)" trap 'rm -rf "$work"' EXIT From 4b919721b162211855e3efd26e9d3a8ce9a0c3fa Mon Sep 17 00:00:00 2001 From: deepend Date: Sun, 22 Feb 2026 07:31:33 -0700 Subject: [PATCH 03/11] Fixed the OpenBSD CI dependency list to keep appindicator support enabled while using the correct OpenBSD package name: libappindicator (instead of removing it or using libayatana-appindicator). --- .github/workflows/openbsd-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/openbsd-build.yml b/.github/workflows/openbsd-build.yml index 7e9dcc15..3d523e18 100644 --- a/.github/workflows/openbsd-build.yml +++ b/.github/workflows/openbsd-build.yml @@ -33,7 +33,7 @@ jobs: meson ninja pkgconf gmake \ gettext-tools \ glib2 gtk+3 dbus-glib libcanberra \ - libayatana-appindicator luajit mono libgdiplus openssl + libappindicator luajit mono libgdiplus openssl work="$(mktemp -d /tmp/zoitechat.XXXXXX)" trap 'rm -rf "$work"' EXIT From e58d128c73701603a6bb16a96509093c88710cd5 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Sun, 22 Feb 2026 14:54:18 +0000 Subject: [PATCH 04/11] Implement fallback for tray icon resolution Add fallback for tray icon if desktop-id fails to resolve. --- src/fe-gtk/plugin-tray.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index ff83f0e0..84bd3cec 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -311,6 +311,19 @@ tray_gtk3_icon_to_name (TrayIcon icon, char **allocated) names = g_themed_icon_get_names (G_THEMED_ICON (icon)); if (names && names[0]) { + /* + * Some StatusNotifier hosts (e.g. XFCE plugin combinations) can fail to + * resolve our desktop-id icon name even when GTK's icon theme lookup says + * it exists. Prefer an absolute PNG fallback for the app's normal icon so + * the tray item never renders as a blank placeholder. + */ + if (g_strcmp0 (names[0], ICON_NORMAL_NAME) == 0) + { + *allocated = tray_gtk3_fallback_icon_path_for_name (names[0]); + if (*allocated) + return *allocated; + } + theme = gtk_icon_theme_get_default (); if (theme && gtk_icon_theme_has_icon (theme, names[0])) return names[0]; From f53e2a21ba8e1e9807d1d899a9be951d23df306c Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Sun, 22 Feb 2026 08:12:28 -0700 Subject: [PATCH 05/11] Add talk-name for KDE Status Notifier Watcher --- flatpak/net.zoite.Zoitechat.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flatpak/net.zoite.Zoitechat.json b/flatpak/net.zoite.Zoitechat.json index 4865d999..f7a04d0b 100644 --- a/flatpak/net.zoite.Zoitechat.json +++ b/flatpak/net.zoite.Zoitechat.json @@ -18,6 +18,8 @@ "--talk-name=org.freedesktop.Notifications", + "--talk-name=org.kde.StatusNotifierWatcher", + "--talk-name=org.mpris.MediaPlayer2.*" ], "add-extensions": { From 275e5504f81b41f42f1a4c78e3a2a05f22c677cd Mon Sep 17 00:00:00 2001 From: deepend Date: Sun, 22 Feb 2026 08:20:26 -0700 Subject: [PATCH 06/11] Added Flatpak D-Bus permissions required for StatusNotifier/AppIndicator tray registration by allowing access to com.canonical.AppMenu.Registrar and ownership of org.kde.StatusNotifierItem-*. This is aimed at fixing the missing tray icon in Flatpak runs. --- flatpak/net.zoite.Zoitechat.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flatpak/net.zoite.Zoitechat.json b/flatpak/net.zoite.Zoitechat.json index f7a04d0b..bf5d7646 100644 --- a/flatpak/net.zoite.Zoitechat.json +++ b/flatpak/net.zoite.Zoitechat.json @@ -19,6 +19,8 @@ "--talk-name=org.freedesktop.Notifications", "--talk-name=org.kde.StatusNotifierWatcher", + "--talk-name=com.canonical.AppMenu.Registrar", + "--own-name=org.kde.StatusNotifierItem-*", "--talk-name=org.mpris.MediaPlayer2.*" ], From 5dcd4151db5ea561d5ec0401bab0086d8a751123 Mon Sep 17 00:00:00 2001 From: deepend Date: Sun, 22 Feb 2026 08:30:07 -0700 Subject: [PATCH 07/11] Fixed the Flatpak finish-args D-Bus permission by changing the invalid bus-name pattern --own-name=org.kde.StatusNotifierItem-* to the valid wildcard form --own-name=org.kde.StatusNotifierItem*, which addresses the Invalid dbus name org.kde.StatusNotifierItem-* failure during finishing/build. --- flatpak/net.zoite.Zoitechat.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flatpak/net.zoite.Zoitechat.json b/flatpak/net.zoite.Zoitechat.json index bf5d7646..5869f1d8 100644 --- a/flatpak/net.zoite.Zoitechat.json +++ b/flatpak/net.zoite.Zoitechat.json @@ -20,7 +20,7 @@ "--talk-name=org.kde.StatusNotifierWatcher", "--talk-name=com.canonical.AppMenu.Registrar", - "--own-name=org.kde.StatusNotifierItem-*", + "--own-name=org.kde.StatusNotifierItem*", "--talk-name=org.mpris.MediaPlayer2.*" ], From 42de1c8e6020502baa74a116d3554c27b147d676 Mon Sep 17 00:00:00 2001 From: deepend Date: Sun, 22 Feb 2026 08:51:05 -0700 Subject: [PATCH 08/11] Restored the Flatpak AppIndicator stack (for Wayland tray support) by re-adding the libayatana-appindicator shared module in the manifest. Removed -Dappindicator=disabled from Flatpak Meson config-opts, so the Wayland-capable AppIndicator backend is built again. --- flatpak/net.zoite.Zoitechat.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flatpak/net.zoite.Zoitechat.json b/flatpak/net.zoite.Zoitechat.json index 5869f1d8..14f5449b 100644 --- a/flatpak/net.zoite.Zoitechat.json +++ b/flatpak/net.zoite.Zoitechat.json @@ -8,6 +8,7 @@ "finish-args": [ "--share=ipc", "--socket=wayland", + "--socket=fallback-x11", "--share=network", "--socket=pulseaudio", "--filesystem=xdg-download", @@ -20,8 +21,11 @@ "--talk-name=org.kde.StatusNotifierWatcher", "--talk-name=com.canonical.AppMenu.Registrar", +<<<<<<< ours "--own-name=org.kde.StatusNotifierItem*", +======= +>>>>>>> theirs "--talk-name=org.mpris.MediaPlayer2.*" ], "add-extensions": { From b6ec7d29810def3708ee93fbc936ab6c81c587fb Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Sun, 22 Feb 2026 08:56:44 -0700 Subject: [PATCH 09/11] Add filesystem permission for tray icon creation --- flatpak/net.zoite.Zoitechat.json | 1 + 1 file changed, 1 insertion(+) diff --git a/flatpak/net.zoite.Zoitechat.json b/flatpak/net.zoite.Zoitechat.json index 14f5449b..2266c245 100644 --- a/flatpak/net.zoite.Zoitechat.json +++ b/flatpak/net.zoite.Zoitechat.json @@ -16,6 +16,7 @@ "--filesystem=xdg-data/icons:ro", "--filesystem=~/.themes:ro", "--filesystem=~/.icons:ro", + "--filesystem=xdg-run/tray-icon:create", "--talk-name=org.freedesktop.Notifications", From fe5033ea6da93fd26be163258d0b5597111dd492 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Sun, 22 Feb 2026 09:00:45 -0700 Subject: [PATCH 10/11] Update talk and own names in Zoitechat JSON --- flatpak/net.zoite.Zoitechat.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/flatpak/net.zoite.Zoitechat.json b/flatpak/net.zoite.Zoitechat.json index 2266c245..b7436edd 100644 --- a/flatpak/net.zoite.Zoitechat.json +++ b/flatpak/net.zoite.Zoitechat.json @@ -19,14 +19,9 @@ "--filesystem=xdg-run/tray-icon:create", "--talk-name=org.freedesktop.Notifications", - "--talk-name=org.kde.StatusNotifierWatcher", "--talk-name=com.canonical.AppMenu.Registrar", -<<<<<<< ours - "--own-name=org.kde.StatusNotifierItem*", -======= ->>>>>>> theirs "--talk-name=org.mpris.MediaPlayer2.*" ], "add-extensions": { From 2ed22b308158c8c86e61f32b648963f0dcbe57db Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Sun, 22 Feb 2026 09:21:24 -0700 Subject: [PATCH 11/11] Delete .github/workflows/openbsd-build.yml --- .github/workflows/openbsd-build.yml | 118 ---------------------------- 1 file changed, 118 deletions(-) delete mode 100644 .github/workflows/openbsd-build.yml diff --git a/.github/workflows/openbsd-build.yml b/.github/workflows/openbsd-build.yml deleted file mode 100644 index 3d523e18..00000000 --- a/.github/workflows/openbsd-build.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: OpenBSD Build - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - openbsd_package: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: true - - - name: Build OpenBSD package - uses: vmactions/openbsd-vm@v1 - with: - release: '7.5' - usesh: true - sync: rsync - run: | - set -eux - - rdate -n pool.ntp.org - export PKG_PATH="https://ftp.openbsd.org/pub/OpenBSD/7.5/packages/$(uname -m)/" - - pkg_add -U \ - git \ - meson ninja pkgconf gmake \ - gettext-tools \ - glib2 gtk+3 dbus-glib libcanberra \ - libappindicator luajit mono libgdiplus openssl - - work="$(mktemp -d /tmp/zoitechat.XXXXXX)" - trap 'rm -rf "$work"' EXIT - - rsync -a --delete "$GITHUB_WORKSPACE"/ "$work/src/" - cd "$work/src" - - rm -rf build - meson setup build \ - --prefix=/usr/local \ - -Dtext-frontend=true \ - -Dgtk3=true \ - -Dplugin=false \ - -Dauto_features=enabled - - ninja -C build - - staging="$work/staging" - rm -rf "$staging" - mkdir -p "$staging" - - # Staged install - DESTDIR="$staging" meson install -C build --no-rebuild - - # If these exist, something ignored DESTDIR (install scripts are leaking) - ls -l /usr/local/bin/zoitechat /usr/local/bin/thememan 2>/dev/null || true - - sync - sleep 1 - sync - - # Freeze staged tree so pkg_create doesn't see moving targets - snap="$work/staging-snap" - rm -rf "$snap" - mkdir -p "$snap" - (cd "$staging" && pax -rw -pe . "$snap") - - version="$(meson introspect --projectinfo build | sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')" - pkg_name="zoitechat-${version}" - pkg_file="${pkg_name}.tgz" - plist="$work/openbsd-plist" - desc="$work/DESCR" - - cat >"$desc" <<'EOF' - ZoiteChat is an IRC client (HexChat-derived) with a GTK UI and optional tools. - EOF - - { - echo "@cwd /usr/local" - - # Files + symlinks - find "$snap/usr/local" \( -type f -o -type l \) -print \ - | LC_ALL=C sort \ - | sed "s#^$snap/usr/local/##" - - # Directories (reverse so children removed first) - find "$snap/usr/local" -mindepth 1 -type d -print \ - | LC_ALL=C sort -r \ - | sed "s#^$snap/usr/local/##" \ - | sed 's#^#@dir #' - } > "$plist" - - # OpenBSD pkg_create: COMMENT is set via -D COMMENT=... (mandatory), no -c flag exists. - # Create the .tgz in $work so we can copy it back out. - cd "$work" - pkg_create \ - -B "$snap" \ - -p /usr/local \ - -f "$plist" \ - -d "$desc" \ - -D "COMMENT=ZoiteChat IRC client" \ - -D "FULLPKGPATH=net/zoitechat" \ - "$pkg_file" - - mkdir -p "$GITHUB_WORKSPACE/artifacts" - cp "$work/$pkg_file" "$GITHUB_WORKSPACE/artifacts/" - - - name: Upload OpenBSD package - uses: actions/upload-artifact@v4 - with: - name: openbsd-package - path: artifacts/*.tgz