Skip to content

feat(niri): close overview on window focus - #3030

Open
korbash wants to merge 1 commit into
AvengeMedia:masterfrom
korbash:feat/niri-overview-window-focus
Open

feat(niri): close overview on window focus#3030
korbash wants to merge 1 commit into
AvengeMedia:masterfrom
korbash:feat/niri-overview-window-focus

Conversation

@korbash

@korbash korbash commented Aug 9, 2026

Copy link
Copy Markdown

Description

Adds a single Niri-only Close Overview on Window Focus option under Personalization → Niri → Overview.

When enabled, DMS closes Niri's overview when an action launches or focuses a window from:

  • the Full and Spotlight launchers
  • the standalone Dock and the Apps Dock bar widget
  • Dock context-menu actions
  • Settings links in Control Center

This replaces the launcher-specific Close Overview on Launch option. Existing spotlightCloseNiriOverview values are migrated to the new shared setting, preserving the user's current preference.

The option is enabled by default. Disabling it keeps the overview open. Non-Niri sessions are unaffected and never attempt to toggle Niri's overview.

Possible follow-up

The remaining Enable Overview Overlay option still lives under Launcher → Niri Integration. It may make sense to move it to Personalization → Niri → Overview in a separate change, keeping all Niri overview behavior in one place.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Closes #2379

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: not applicable
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dlx-docs to document the new behavior

@Purian23

Purian23 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Hi there, from the writeup it's a bit of a change. Can you provide a video walkthrough of the feature you're looking to implement. Thanks!

@korbash

korbash commented Aug 9, 2026

Copy link
Copy Markdown
Author
2026-08-10_02-09-23_03-25.mp4

@korbash

korbash commented Aug 10, 2026

Copy link
Copy Markdown
Author

I definitely need more time to make this PR clearer.

@korbash
korbash force-pushed the feat/niri-overview-window-focus branch from c96f6fe to 8f34cc6 Compare August 10, 2026 16:04
@korbash

korbash commented Aug 10, 2026

Copy link
Copy Markdown
Author

I rewrote the PR to centralize the behavior instead of adding Niri overview checks at individual UI call sites.

The overview close logic now lives in the lower-level paths:

  • SettingsModal.show() for opening/showing Settings, including tab/lazy-load paths.
  • CompositorService.activateToplevel() for focusing existing windows.
  • CompositorService.toggleToplevel() now routes focus branches through activateToplevel().
  • SessionService.launchDesktopEntry() / launchDesktopAction() for launching new apps/actions. Ideally this would wait until the launched window actually appears, but I did know how to do that.
  • focusOrToggleSettings*() keeps the existing hide/toggle behavior; only its focus branch uses activateToplevel().

The old launcher-only setting was replaced with closeNiriOverviewOnWindowFocus and moved to Personalization → Niri → Overview, with migration from spotlightCloseNiriOverview.

@korbash
korbash force-pushed the feat/niri-overview-window-focus branch from 8f34cc6 to 8926301 Compare August 13, 2026 17:59
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.

Close overview when starting application from dock

2 participants