You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor DialogHost to use HwndSourceHook for focus
Replaced the Window.StateChanged event-based approach with an
HwndSourceHook-based implementation to handle window state changes
(minimize/restore) more effectively. Removed `_previousWindowState`
and introduced `_hook` for managing system commands (`WM_SYSCOMMAND`).
Added a `Hook` method to handle `SC_MINIMIZE` and `SC_RESTORE`
commands, ensuring proper focus management. Refactored focus
restoration logic to use asynchronous behavior (`Task.Delay` and
`Dispatcher.BeginInvoke`) for improved reliability. Removed redundant
state-checking methods and improved code clarity with constants for
system commands.
0 commit comments