Skip to content

Conversation

@dremin
Copy link
Collaborator

@dremin dremin commented Feb 18, 2025

  • Removed the ShowInTaskbar=false from AppBarWindow because all it does is creates a hidden owner window and removes the APPWINDOW style. We already have the TOOLWINDOW style so we don't need an owner to be hidden from the taskbar. Enhanced the helper that sets TOOLWINDOW to also remove APPWINDOW.
  • Removed a lot of duplication across AppBarManager and AppBarWindow, mostly around sizing/positioning logic.
  • Added a cache of the current window rect to AppBarWindow so that it doesn't have to be fetched as often.
  • More consistently use pixels instead of performing math on WPF's points-based size/position values
  • Removed the timer-based AppBar positioning hacks in favor of reacting to unexpected WM_WINDOWPOSCHANGED messages instead. Whenever we intentionally update our position, we set a flag, so we only react when something else is doing it, which prevents creating a loop here.
  • Added a workaround for this WPF bug
  • Fixed a few bugs with mixed DPI.
  • Add virtual methods to AppBarWindow that shells can use to modify full screen event handling.

It creates a hidden owner window and removes the APPWINDOW style. We already have the TOOLWINDOW style so we don't need an owner to be hidden from the taskbar.
Deduplicated several code blocks
Simplified function calling patterns
Cache window rect and reduce points/pixels conversions
Remove timer-based hacks in favor of handling window messages
Workaround WPF activation bug when DPI changes
Fixed a few bugs
@dremin dremin requested a review from josuave February 18, 2025 04:33
@josuave josuave merged commit 0f95aa9 into master Feb 18, 2025
1 check passed
@josuave josuave deleted the appbar-refactors branch February 18, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants