Skip to content

Activate a dock app after the clock opens Action Center - #13

Merged
SumirSeth merged 2 commits into
SumirSeth:mainfrom
JulienMaille:fix/dock-activate-after-clock
Nov 7, 2026
Merged

SumirSeth merged 2 commits into
SumirSeth:mainfrom
JulienMaille:fix/dock-activate-after-clock

Conversation

@JulienMaille

Copy link
Copy Markdown
Contributor

Fixes #11.

When the Action Center (or the Start menu or search) is open, it holds the foreground from an AppContainer, so Windows refuses both a plain SetForegroundWindow and thread-input attachment. Clicking a running-app icon in the dock therefore did nothing until the flyout was closed by hand.

focus now sends Escape when the foreground belongs to a shell flyout host (ShellExperienceHost, StartMenuExperienceHost, SearchHost, ShellHost), waits for it to close, and then activates the clicked window. It also waits briefly for the activation to land, since Windows reports the switch a moment after the call while the flyout closes.

Verified on Windows 11: with Notepad3 in front, clicking the clock to open the Action Center and then a different app's dock icon brings that app to the front.

JulienMaille and others added 2 commits November 7, 2026 21:50
The retry only helps when a flyout was dismissed; otherwise it kept the
dock's UI thread waiting another 400 ms before reporting the failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SumirSeth
SumirSeth force-pushed the fix/dock-activate-after-clock branch from a151640 to f512af8 Compare November 7, 2026 16:20
@SumirSeth
SumirSeth merged commit 0dce7f6 into SumirSeth:main Nov 7, 2026
1 check passed
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.

Clicking datetime icon then any icon of a running app doesn't toggle any app

2 participants