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

Make setFocusable only deactivate a window if focusable is false. Do not deactivate a window when setting focusable to true.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: vulture <isu@vulture.fm>
This commit is contained in:
trop[bot]
2025-11-13 09:52:58 +01:00
committed by GitHub
parent bc1ca72dc7
commit 895cf006e7

View File

@@ -1364,7 +1364,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
}