Compare commits

...

1 Commits

Author SHA1 Message Date
Shelley Vohr
64946f9244 fix: BrowserWindow.isFocused on Windows 2025-07-21 19:29:05 +02:00

View File

@@ -550,7 +550,12 @@ void NativeWindowViews::Focus(bool focus) {
} }
bool NativeWindowViews::IsFocused() const { bool NativeWindowViews::IsFocused() const {
return widget()->IsActive(); bool active = widget()->IsActive();
#if BUILDFLAG(IS_WIN)
return active && ::GetForegroundWindow() == GetAcceleratedWidget();
#else
return active;
#endif
} }
void NativeWindowViews::Show() { void NativeWindowViews::Show() {