fix: correctly track BaseWindow::IsActive() on MacOS (#49460)

fix: correctly set IsActive() in BaseWindow on MacOS
This commit is contained in:
Kyle Cutler
2026-03-18 08:47:19 -07:00
committed by GitHub
parent 4ec6923898
commit ade684dc35
2 changed files with 7 additions and 0 deletions

View File

@@ -307,6 +307,12 @@ void BaseWindow::OnWindowSheetEnd() {
Emit("sheet-end");
}
void BaseWindow::OnWindowIsKeyChanged(bool is_key) {
#if BUILDFLAG(IS_MAC)
window()->SetActive(is_key);
#endif
}
void BaseWindow::OnWindowEnterHtmlFullScreen() {
Emit("enter-html-full-screen");
}

View File

@@ -84,6 +84,7 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
void OnWindowRotateGesture(float rotation) override;
void OnWindowSheetBegin() override;
void OnWindowSheetEnd() override;
void OnWindowIsKeyChanged(bool is_key) override;
void OnWindowEnterFullScreen() override;
void OnWindowLeaveFullScreen() override;
void OnWindowEnterHtmlFullScreen() override;