Skip to content

fix(gui): add application menu to Activities window - #10753

Draft
gardar wants to merge 2 commits into
nextcloud:masterfrom
gardar:fix/activities-window-menu
Draft

fix(gui): add application menu to Activities window#10753
gardar wants to merge 2 commits into
nextcloud:masterfrom
gardar:fix/activities-window-menu

Conversation

@gardar

@gardar gardar commented Sep 7, 2026

Copy link
Copy Markdown

Resolves

Fixes #10609
Fixes #10551

Summary

On native Wayland clicking the systray does not open a popup menu but instead falls back to opening the Activities window, and since the 34.x redesign that window has no way to reach Settings or switch accounts. In Sway for example the tray icon itself works fine, so this is not a missing-tray case.
The same menu is exported over DBusMenu and hosts such as waybar or Plasma show it on right click, but swaybar renders no DBusMenu: it calls the item's ContextMenu method instead, which a Wayland client cannot honour because it can only anchor popups to its own surface. On Sway neither middle nor right clicking the icon produces a menu. The account area in the window header also looks like the old account switcher but has never been interactive, on any platform (#10551).

Clicking the account area now opens an application menu with:

  • Account switching
  • Add account
  • Pause/Resume sync for all
  • Settings
  • Quit

This reuses the existing Systray and UserModel paths, and restores the behaviour the pre-34 client had when clicking the username/icon area. Tray popup behaviour is unchanged, and the header stays inert in the Search and Assistant windows, which opt out.

Also fixed a pre-existing rounding bug in the same header which I found while working on this: the account column is sized from the labels' fractional implicit width, so text that fits could still be elided by a fraction of a pixel. That is the difference visible in the server line of the screenshots below.

Before: the account area is not interactive

10609-before

After: clicking the account area opens the application menu

10609-after-menu

Testing

Tested on Arch Linux and Sway on native Wayland with no XWayland installed, against a throwaway server with two accounts: the menu opens under the account area and dismisses correctly and all the actions work.

New tests: ActivitiesMenuQmlTest (menu contents, account switching, the current-account mark, that the account area is inert unless a window opts in, and that long or tight-fitting account text is not clipped) and SystraySyncControlTest.

Checklist

clicking the account area now opens an application menu with account
switching, Add account, pause and resume, Settings and Quit, as the
pre-34 client did

on native Wayland the tray popup cannot be presented, so activating the
tray icon opens this window instead of the menu, and the account area in
its header has never been interactive on any platform

Fixes nextcloud#10609
Fixes nextcloud#10551

Signed-off-by: gardar <gardar@users.noreply.github.com>
the account column is sized to the labels' fractional implicit width and
the layout rounds that down, so text that fits could still be elided,
depending on the display scale; round the requested width up instead

Signed-off-by: gardar <gardar@users.noreply.github.com>
@gardar
gardar force-pushed the fix/activities-window-menu branch from 9a55cbd to 1ece517 Compare September 7, 2026 01:53
@Rello

Rello commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

fyi: we are just discussing a better approach.
Thank you for your suggestion. I will bring some of the features to the new menu, but there are more (search, assistant, onlinestatus).
We currently discuss about using the settings window as the default for Linux - and exend this with the missing jump buttons.
will get back here

@Rello

Rello commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

#10758

@Rello
Rello marked this pull request as draft September 8, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to switch account and open settings on 34.0.1 Account switcher (top-right) not clickable/functional under Hyprland (Wayland)

2 participants