mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xkb: Store the action filters per device in the XkbSrvInfoRec.
Using a global array for action filters is bad. If two keyboard hit a modifier at the same time, releaseing the first one will deactivate the filter and thus the second keyboard can never release the modifier again.
This commit is contained in:
@@ -126,6 +126,24 @@ typedef struct _XkbEventCause {
|
||||
#define _BEEP_LED_CHANGE 14
|
||||
#define _BEEP_BOUNCE_REJECT 15
|
||||
|
||||
struct _XkbSrvInfo; /* definition see below */
|
||||
|
||||
typedef struct _XkbFilter {
|
||||
CARD16 keycode;
|
||||
CARD8 what;
|
||||
CARD8 active;
|
||||
CARD8 filterOthers;
|
||||
CARD32 priv;
|
||||
XkbAction upAction;
|
||||
int (*filter)(
|
||||
struct _XkbSrvInfo* /* xkbi */,
|
||||
struct _XkbFilter * /* filter */,
|
||||
unsigned /* keycode */,
|
||||
XkbAction * /* action */
|
||||
);
|
||||
struct _XkbFilter *next;
|
||||
} XkbFilterRec,*XkbFilterPtr;
|
||||
|
||||
typedef struct _XkbSrvInfo {
|
||||
XkbStateRec prev_state;
|
||||
XkbStateRec state;
|
||||
@@ -169,6 +187,9 @@ typedef struct _XkbSrvInfo {
|
||||
OsTimerPtr bounceKeysTimer;
|
||||
OsTimerPtr repeatKeyTimer;
|
||||
OsTimerPtr krgTimer;
|
||||
|
||||
int szFilters;
|
||||
XkbFilterPtr filters;
|
||||
} XkbSrvInfoRec, *XkbSrvInfoPtr;
|
||||
|
||||
#define XkbSLI_IsDefault (1L<<0)
|
||||
|
||||
Reference in New Issue
Block a user