fix: Windows: Calling window.setFocusable(true) will no longer cause a window to lose focus (#45640)

Make setFocusable only deactivate a window if focusable is false. Do not deactivate a window when setting focusable to true.
This commit is contained in:
vulture
2025-11-12 12:15:40 -08:00
committed by GitHub
parent 3c5513015a
commit 92a910d15c

View File

@@ -1363,7 +1363,8 @@ void NativeWindowViews::SetFocusable(bool focusable) {
ex_style |= WS_EX_NOACTIVATE;
::SetWindowLong(GetAcceleratedWidget(), GWL_EXSTYLE, ex_style);
SetSkipTaskbar(!focusable);
Focus(false);
if (!focusable)
Focus(false);
#endif
}