aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-08-25 13:13:39 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-08-31 12:25:34 +0300
commit0bb33b5348dbddd65b88a7f00449c965562355d3 (patch)
tree28696ebb76f16efe4191cbb691390da33d979668 /src/qt/guiutil.cpp
parentdb67101c748c208cced8e9b76a66d57cd48fbf6e (diff)
downloadbitcoin-0bb33b5348dbddd65b88a7f00449c965562355d3.tar.xz
qt: Replace objc_msgSend with native syntax
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r--src/qt/guiutil.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index dc1da7f8a9..e3f6386705 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -58,9 +58,10 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#include <objc/objc-runtime.h>
#include <CoreServices/CoreServices.h>
#include <QProcess>
+
+void ForceActivation();
#endif
namespace GUIUtil {
@@ -360,10 +361,7 @@ bool isObscured(QWidget *w)
void bringToFront(QWidget* w)
{
#ifdef Q_OS_MAC
- // Force application activation on macOS. With Qt 5.4 this is required when
- // an action in the dock menu is triggered.
- id app = objc_msgSend((id) objc_getClass("NSApplication"), sel_registerName("sharedApplication"));
- objc_msgSend(app, sel_registerName("activateIgnoringOtherApps:"), YES);
+ ForceActivation();
#endif
if (w) {