From a7110cabb39d2aef6a54a2ed837a52bf615b3638 Mon Sep 17 00:00:00 2001 From: Shatur95 Date: Wed, 6 Nov 2019 01:34:42 +0200 Subject: [PATCH] Fix crash on Wayland --- QHotkey/qhotkey_x11.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/QHotkey/qhotkey_x11.cpp b/QHotkey/qhotkey_x11.cpp index 6d7cfc7..a3e48ee 100644 --- a/QHotkey/qhotkey_x11.cpp +++ b/QHotkey/qhotkey_x11.cpp @@ -99,8 +99,7 @@ quint32 QHotkeyPrivateX11::nativeKeycode(Qt::Key keycode, bool &ok) return 0; } - Display *display = QX11Info::display(); - if(display) { + if(QX11Info::isPlatformX11()) { auto res = XKeysymToKeycode(QX11Info::display(), keysym); if(res != 0) ok = true;