mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
Set Command Palette window as the topmost when shown and move to the bottom when hidden (#40444)
## Summary of the Pull Request Ensures the Command Palette main window is brought to the front and made topmost when shown. When the palette is hidden (cloaked but not destroyed), it is moved to the bottom of the window stack to avoid interfering with the user workflow. Dynamic removal of the topmost flag is a precaution to prevent the cloak window from bothering user in accessibility tools that too much -- in case they don't recognize cloak windows as not visible). ## PR Checklist - [x] **Closes:** #38726 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Nothing to test - [x] **Localization:** Nothing to localize - [x] **Dev docs:** Nothing to update - [x] **New binaries:** No new binaries - [x] **Documentation updated:** nothing to update ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed I've tested that the Command Palette window is display over other top-most windows (e.g. Task Manager). I've tested that the command palette is displayed over the Rainbow gadgets when it was originally under the gadget.
This commit is contained in:
@@ -6,6 +6,8 @@ SetForegroundWindow
|
||||
GetWindowRect
|
||||
GetCursorPos
|
||||
SetWindowPos
|
||||
HWND_TOPMOST
|
||||
HWND_BOTTOM
|
||||
IsIconic
|
||||
RegisterHotKey
|
||||
UnregisterHotKey
|
||||
|
||||
Reference in New Issue
Block a user