Skip to content

CmdPal Dock: fix snapped windows overlapping the dock surface#46864

Draft
DaveT1991 wants to merge 4 commits intomicrosoft:mainfrom
DaveT1991:fix/cmdpal-dock-snapped-window-overlap
Draft

CmdPal Dock: fix snapped windows overlapping the dock surface#46864
DaveT1991 wants to merge 4 commits intomicrosoft:mainfrom
DaveT1991:fix/cmdpal-dock-snapped-window-overlap

Conversation

@DaveT1991
Copy link
Copy Markdown

Summary

UpdateWindowPosition expanded the dock window by SM_CXFRAME on all
four sides to account for the invisible DWM resize border. The side
facing the work area was also extended by frameWidth pixels past the
rect registered with ABM_SETPOS. Windows Snap layouts respect the
work-area boundary (which matches _appBarData.rc), so any snapped
window would start right at that boundary and partially cover the
visible dock.

Fix: apply the frame expansion only on the three sides that face away
from the work area. The edge that borders the work area is kept exactly
at _appBarData.rc, so snapped windows now abut the dock cleanly on
all four dock positions (Top, Bottom, Left, Right).

Issues Fixed

Fixes #46849

DaveT1991 and others added 4 commits April 9, 2026 17:37
The schwa (ə) is an IPA phonetic symbol, not an Italian accented letter,
and is already covered by the IPA language set. The Euro sign (€) is a
currency symbol and does not belong in a language-specific accent set.

Italian only uses è and é as accented forms of the letter e.

Fixes microsoft#46857
When loading the machine matrix, two scenarios could produce a duplicate
machine slot that the user had no way to remove:

1. MachinePool stored the same machine name under multiple IDs (e.g. after
   a reconnect with a new ID). The available-machine list was built without
   deduplication, so both entries could end up racing for the same slot.

2. A matrix persisted from an earlier session already contained a duplicate
   name. The removal loop only checked availability against MachinePool, so
   the duplicate passed through and was preserved on every reload.

Fix both by:
- Deduplicating the available-machine list as it is built from MachinePool
  (case-insensitive, matching the rest of the codebase).
- Tracking seen names in a HashSet while iterating the saved matrix and
  clearing any slot whose name has already appeared earlier.
- Making all Contains comparisons case-insensitive for consistency.

Fixes microsoft#46858
The window position was expanded by SM_CXFRAME on all four sides to
account for the invisible DWM resize border. This caused the visible
dock surface to extend frameWidth pixels past the reserved app-bar rect
(_appBarData.rc). Snap layouts respect the work-area boundary set by
ABM_SETPOS, which matches _appBarData.rc, so snapped windows would
partially cover the dock on the side facing the work area.

Fix: only expand outward on the three sides that face away from the work
area (off-screen or the screen edge). The side that faces the work area
is kept exactly at _appBarData.rc so snapped windows abut it cleanly.

Fixes microsoft#46849
@jiripolasek
Copy link
Copy Markdown
Collaborator

Hi @DaveT1991,
I think you might want to check this PR and its content before asking anyone to review it.

@jiripolasek jiripolasek marked this pull request as draft April 10, 2026 05:48
@michaeljolley michaeljolley added Product-Command Palette Refers to the Command Palette utility CmdPal - Dock Issues related to the Command Palette Dock labels Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CmdPal - Dock Issues related to the Command Palette Dock Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows snapped to top of screen cover command dock

3 participants