Skip to content

[stable-33.0] fix(macOS): hide dock icon when closing settings with ⌘+W#9708

Merged
i2h3 merged 1 commit intostable-33.0from
backport/9702/stable-33.0
Mar 26, 2026
Merged

[stable-33.0] fix(macOS): hide dock icon when closing settings with ⌘+W#9708
i2h3 merged 1 commit intostable-33.0from
backport/9702/stable-33.0

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Mar 26, 2026

Backport of PR #9702

The ⌘+W shortcut was connected to QDialog::accept(), which internally
calls hide() and emits QEvent::Hide. The ForegroundBackground event
filter only listens for QEvent::Close, so the dock icon remained visible.

Clicking the window's close button works correctly because it sends
QEvent::Close directly.

Connecting the shortcut to close() instead of accept() ensures
QEvent::Close is sent, making ⌘+W behave identically to the close
button: the event filter fires, ToBackground() is called, and the dock
icon disappears.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@backportbot backportbot bot requested a review from i2h3 March 26, 2026 12:15
@backportbot backportbot bot requested review from mgallien and nilsding as code owners March 26, 2026 12:15
@backportbot backportbot bot added bug os: 🍎 macOS Apple macOS, formerly also known as OS X feature: ☁️ GUI System tray icon and menu. 3. to review labels Mar 26, 2026
@backportbot backportbot bot added this to the 33.0.1 milestone Mar 26, 2026
@i2h3 i2h3 merged commit 4291d0b into stable-33.0 Mar 26, 2026
15 checks passed
@i2h3 i2h3 deleted the backport/9702/stable-33.0 branch March 26, 2026 12:20
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug feature: ☁️ GUI System tray icon and menu. os: 🍎 macOS Apple macOS, formerly also known as OS X

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant