X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Fwm_hotkeys.c;h=00041a94de672544cca8a81defafb8afbf78e960;hb=e7a76b0d8a0cc6aa77966509780973a6f8216ef7;hp=c8eab69791cff3760b9f94bfd3cbdea0aa56fd02;hpb=9c435c78b45c6b62a8182334e44d87b4a6a198f7;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/wm_hotkeys.c b/Usermode/Applications/axwin3_src/WM/wm_hotkeys.c index c8eab697..00041a94 100644 --- a/Usermode/Applications/axwin3_src/WM/wm_hotkeys.c +++ b/Usermode/Applications/axwin3_src/WM/wm_hotkeys.c @@ -41,9 +41,7 @@ void WM_Hotkey_Register(int nKeys, uint32_t *Keys, const char *ActionName) strcpy((char*)h->Target, ActionName); memcpy(h->Keys, Keys, nKeys * sizeof(uint32_t)); - h->Next = NULL; - if( gpWM_Hotkeys ) - gpWM_Hotkeys->Next = h; + h->Next = gpWM_Hotkeys; gpWM_Hotkeys = h; } @@ -64,6 +62,7 @@ void WM_Hotkey_RegisterAction(const char *ActionName, tWindow *Target, uint16_t strcpy((char*)t->Name, ActionName); t->Window = Target; t->Index = Index; + t->Next = NULL; // TODO: Register to be informed when the window dies/closes? @@ -116,7 +115,7 @@ void WM_Hotkey_KeyUp(uint32_t Scancode) void WM_Hotkey_FireEvent(const char *Target) { - _SysDebug("WM_Hotkey_FireEvent: (%s)", Target); +// _SysDebug("WM_Hotkey_FireEvent: (%s)", Target); // - Internal events (Alt-Tab, Close, Maximize, etc...) // TODO: Internal event handling @@ -142,13 +141,13 @@ void WM_Hotkey_FireEvent(const char *Target) static void _SetKey(uint32_t sc) { - _SysDebug("_SetKey: (%x)", sc); +// _SysDebug("_SetKey: (%x)", sc); if( sc >= MAX_STATE_SCANCODE ) return; gWM_KeyStates[sc/8] |= 1 << (sc % 8); } static void _UnsetKey(uint32_t sc) { - _SysDebug("_UnsetKey: (%x)", sc); +// _SysDebug("_UnsetKey: (%x)", sc); if( sc >= MAX_STATE_SCANCODE ) return; gWM_KeyStates[sc/8] &= ~(1 << (sc % 8)); }