mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
added X11 implementation
This commit is contained in:
@@ -206,8 +206,8 @@ bool QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut shortcut)
|
||||
GetApplicationEventTarget(),
|
||||
0,
|
||||
&eventRef);
|
||||
if (status != noErr) {
|
||||
qWarning() << "QHotkey: Failed to register hotkey with error:" << status;
|
||||
if (status != noErr) {
|
||||
qWarning() << "QHotkey: Failed to register hotkey. Error:" << status;
|
||||
return false;
|
||||
} else {
|
||||
this->hotkeyRefs.insert(shortcut, eventRef);
|
||||
@@ -219,8 +219,8 @@ bool QHotkeyPrivateMac::unregisterShortcut(QHotkey::NativeShortcut shortcut)
|
||||
{
|
||||
EventHotKeyRef eventRef = QHotkeyPrivateMac::hotkeyRefs.value(shortcut);
|
||||
OSStatus status = UnregisterEventHotKey(eventRef);
|
||||
if (status != noErr) {
|
||||
qWarning() << "QHotkey: Failed to unregister hotkey with error:" << status;
|
||||
if (status != noErr) {
|
||||
qWarning() << "QHotkey: Failed to unregister hotkey. Error:" << status;
|
||||
return false;
|
||||
} else {
|
||||
this->hotkeyRefs.remove(shortcut);
|
||||
|
||||
Reference in New Issue
Block a user