Hi, the attached patch solves an issue that I've had with cwm, namely that my Meta modifier would get stuck until I pressed some *other* modifier.
The reason is that cwm's handling of modifier releases is rudimentary in that it just looks for key release events from any of a fixed list of keys that it assumes to be modifiers, rather than from the key that actually generated the modifier press event. Its current list ("modkeys") includes only Alt, Super, Control, and ISO Level 3 Shift, not Meta. Thus it gets confused if one has a keymap with separate Alt and Meta keys. The patch expands the list to include XK_Meta_L and XK_Meta_R to fix the immediate issue without trying to implement a more "correct" approach. Hoping this can be accepted. -pesco
Index: app/cwm/xevents.c =================================================================== RCS file: /cvs/xenocara/app/cwm/xevents.c,v retrieving revision 1.150 diff -u -p -r1.150 xevents.c --- app/cwm/xevents.c 24 Mar 2020 14:47:29 -0000 1.150 +++ app/cwm/xevents.c 1 Jul 2023 20:03:53 -0000 @@ -68,8 +68,9 @@ void (*xev_handlers[LASTEvent])(XEvent [Expose] = xev_handle_expose, }; -static KeySym modkeys[] = { XK_Alt_L, XK_Alt_R, XK_Super_L, XK_Super_R, - XK_Control_L, XK_Control_R, XK_ISO_Level3_Shift }; +static KeySym modkeys[] = { XK_Alt_L, XK_Alt_R, XK_Meta_L, XK_Meta_R, + XK_Super_L, XK_Super_R, XK_Control_L, XK_Control_R, + XK_ISO_Level3_Shift }; static void xev_handle_maprequest(XEvent *ee)