From 362e98937356a74a5b70d65348957edf05b1138a Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 30 Jun 2023 19:14:17 +0100 Subject: [PATCH] gui: drop macOS ForceActivation workaround Discussion in #16720 seems to point to this being no-longer needed after qt 5.6+. We now required 5.11.x+. --- src/qt/guiutil.cpp | 5 ----- src/qt/macdockiconhandler.mm | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 8d8328aad8a..8e7d0b0920b 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -80,7 +80,6 @@ #include -void ForceActivation(); #endif using namespace std::chrono_literals; @@ -400,10 +399,6 @@ bool isObscured(QWidget *w) void bringToFront(QWidget* w) { -#ifdef Q_OS_MACOS - ForceActivation(); -#endif - if (w) { // activateWindow() (sometimes) helps with keyboard focus on Windows if (w->isMinimized()) { diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm index 5eb23c76e67..5099a9dff8c 100644 --- a/src/qt/macdockiconhandler.mm +++ b/src/qt/macdockiconhandler.mm @@ -41,13 +41,3 @@ void setupDockClickHandler() { { delete s_instance; } - -/** - * Force application activation on macOS. With Qt 5.5.1 this is required when - * an action in the Dock menu is triggered. - * TODO: Define a Qt version where it's no-longer necessary. - */ -void ForceActivation() -{ - [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; -}