Skip to content

App becomes unresponsive via tray icon after minimizing (Wayland/GNOME) #55

Description

@faasie

Environment

Description

After minimizing the app (which hides the window to tray), clicking the tray icon to restore the window often fails. The issue is intermittent but reproducible.

Investigation shows the D-Bus StatusNotifierItem interface becomes completely unresponsive when this happens — calls to Activate and even basic Ping timeout:

$ gdbus call --session --dest=":1.3349" --object-path="/StatusNotifierItem" \
    --method org.kde.StatusNotifierItem.Activate 0 0
Error: Timeout was reached

$ dbus-send --session --dest=":1.3349" --print-reply --reply-timeout=1000 \
    /StatusNotifierItem org.freedesktop.DBus.Peer.Ping
Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply.

The tray icon remains visible and registered with the StatusNotifierWatcher, but Notion stops processing D-Bus messages entirely. The right-click context menu also fails to respond.

Steps to reproduce

  1. Launch notion-electron
  2. Minimize window (sends to tray via the hide() call)
  3. Work in other applications for a few minutes
  4. Click tray icon to restore — no response
  5. Right-click tray icon — context menu doesn't appear

Possible cause

Looking at the source code:

  1. index.mjs intercepts minimize and calls mainWindow.hide() instead:
mainWindow.on('minimize', function (event) {
    event.preventDefault();
    mainWindow.hide();
});
  1. The app uses a custom D-Bus implementation (@clebert/node-d-bus) via lib/dbus.mjs rather than Electron's built-in mechanisms.

The D-Bus message processing may be getting blocked or starved when the Electron window is hidden, causing the StatusNotifierItem interface to stop responding to Activate calls from the tray.

Workaround

Currently none — when this occurs, the only option is to kill and restart the application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions