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;