Skip to content

Keep taskbar search box away from the tray - #817

Open
ArneBouten wants to merge 4 commits into
srwi:developfrom
ArneBouten:fix/taskbar-box-position
Open

ArneBouten wants to merge 4 commits into
srwi:developfrom
ArneBouten:fix/taskbar-box-position

Conversation

@ArneBouten

@ArneBouten ArneBouten commented Oct 25, 2026 •

Copy link
Copy Markdown

Fixes #816

  • Use the TrayNotifyWnd rect as an obstacle, so the box can't end up under the tray when the UIA search for tray icons comes back empty.
  • If no tray is found at all, keep the current position and retry a few times (about 8 s) before using the layout.
  • Ignore tray icons that lie inside the notification area. They are already covered by it, and the press animation of the "Show hidden icons" button briefly reports a larger rect, which made the box shift when opening the overflow.
  • Only move to a new position once it has been stable for 5 s, as long as the current position is still free. This stops the box from shifting back and forth during short taskbar reflows or when a tray icon briefly disappears (e.g. Google Drive restarting a process every ~20 s here). Moves needed to avoid an overlap still happen right away.

Tested on Windows 11 26H2 (1920×1080, 100%, left-aligned taskbar): placement is unchanged in normal use, the box returns to the right spot after an Explorer restart, and it no longer shifts when a tray icon is added and removed repeatedly or when the "Show hidden icons" button is clicked.

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.

Taskbar search box sometimes moves under the tray icons

1 participant