From a1ac6662d3be2d211187bedbe743ce2a49ee6db9 Mon Sep 17 00:00:00 2001 From: Ty Date: Sun, 18 Jan 2026 11:22:33 -0500 Subject: [PATCH] QT: Focus the main window when the DisplayWidget is focused to get its toolbar --- pcsx2-qt/DisplayWidget.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcsx2-qt/DisplayWidget.cpp b/pcsx2-qt/DisplayWidget.cpp index 151812f1ed..691f93d8a2 100644 --- a/pcsx2-qt/DisplayWidget.cpp +++ b/pcsx2-qt/DisplayWidget.cpp @@ -477,6 +477,13 @@ bool DisplaySurface::eventFilter(QObject* object, QEvent* event) } return false; + case QEvent::FocusIn: + // macOS: When we (the display window) get focus from another window with a toolbar we update to the MainWindow toolbar. + // This is because we are a different native window from our MainWindow. So, whenever we get focus, focus our MainWindow. + // That way macOS will show the MainWindow toolbar when you click from the debugger / log window to the game. + if (auto* w = qobject_cast(object)) + w->window()->activateWindow(); + return false; default: return false; }