fix(linux): the Pomodoro timer shows in the top bar from the snap too
From the snap, nothing showed in the top bar: AppArmor refused the item's bus name (dbus_bind org.freedesktop.StatusNotifierItem-<pid>-1), which snapd's desktop plug doesn't grant, contrary to what the research found. The item is now laid out as libayatana-appindicator lays itself out, within what snapd v2.77's desktop-legacy plug allows: at /org/ayatana/NotificationItem/halkyon_learn, the only path from which the label's signal (XAyatanaNewLabel) may come, and registered with the watcher by that path under the connection's own name, binding no name at all. Checked against GNOME's watcher here: it registers as the system's own indicators do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
5d9a9fdef8
commit
2030e397cc
1 changed files with 20 additions and 16 deletions
|
|
@ -187,13 +187,17 @@ void main() {
|
|||
|
||||
await platform.show(notice(run));
|
||||
|
||||
final [name] = watcher.registered;
|
||||
expect(name, startsWith('org.freedesktop.StatusNotifierItem-'));
|
||||
// Registered by its path, as libayatana-appindicator does: the snap's
|
||||
// rules let the item bind no name, and send the label's signal only
|
||||
// from there.
|
||||
final [registered] = watcher.registered;
|
||||
expect(registered, '/org/ayatana/NotificationItem/halkyon_learn');
|
||||
final name = app.uniqueName;
|
||||
expect(notifications.notified, isEmpty);
|
||||
final item = DBusRemoteObject(
|
||||
shell,
|
||||
name: name,
|
||||
path: DBusObjectPath('/StatusNotifierItem'),
|
||||
path: DBusObjectPath(registered),
|
||||
);
|
||||
expect(
|
||||
await item.getProperty('org.kde.StatusNotifierItem', 'XAyatanaLabel'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue