Skip to content

Fix issue with shortcuts not showing on Windows 11 - #6

Open
jbsmith7741 wants to merge 1 commit into
Larsonix:mainfrom
jbsmith7741:popup
Open

jbsmith7741 wants to merge 1 commit into
Larsonix:mainfrom
jbsmith7741:popup

Conversation

@jbsmith7741

Copy link
Copy Markdown

Summary

Taskbar group shortcuts could launch without a visible popup on Windows 11 (especially with multiple monitors).

Cause

  • Shortcuts are created with AppUserModelID TaskbarGroupEx.Menu.{Name}, but the popup process searched for the legacy ID tjackenpacken.taskbarGroup.menu.{Name}, so the pin was never matched.
  • On Win11, taskbar buttons live under the tray/XAML bridge; querying MSTaskListWClass returns no children, so positioning always fell back to the mouse.
  • That fallback used the cursor’s Y on the taskbar, which placed the popup under/off the bottom of the screen or on the wrong monitor.
  • Taskbar launches could also fire Deactivated before the popup finished activating, closing it immediately.

Fix

  • Use TaskbarGroupEx.Menu.{Name} (still accept the legacy ID).
  • Find pins via Shell_TrayWnd / Shell_SecondaryTrayWnd, pick the nearest button to the cursor, and place the popup above it.
  • If lookup fails, center horizontally on the cursor and sit above it (not at taskbar Y).
    Keep the popup topmost and ignore deactivate until after startup settles.

  * Align AppUserModelID with shortcut pins so Win11 can find the button
  * Prefer the nearest primary or secondary tray pin; fall back above the cursor
  * Ignore early deactivate so taskbar launches do not close instantly
@jbsmith7741 jbsmith7741 changed the title Fix issue with shortcuts not showing on Windows 11. Fix issue with shortcuts not showing on Windows 11 Nov 22, 2026
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.

1 participant