diff options
author | Daniel Stone <daniel@fooishbar.org> | 2007-12-05 19:37:48 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2007-12-05 19:37:48 +0000 |
commit | 320abd7d1d906807448fa01ad3377daf707f46cc (patch) | |
tree | 2a652c4d3db41087ae1fd1d79090b1b848dfcb6f /xkb | |
parent | 85dd8efac1bc0715f03c99d261b1c5d0980623e1 (diff) |
XKB: Actions: Don't run certain actions on the core keyboard
Don't run VT switches, terminations, or anything, on the core keyboard: only
run actions which affect the keyboard state. If we get an action such as VT
switch, just swallow the event.
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/ddxKillSrv.c | 4 | ||||
-rw-r--r-- | xkb/xkbActions.c | 19 |
2 files changed, 20 insertions, 3 deletions
diff --git a/xkb/ddxKillSrv.c b/xkb/ddxKillSrv.c index a573ecbd8..3b5fd5353 100644 --- a/xkb/ddxKillSrv.c +++ b/xkb/ddxKillSrv.c @@ -41,6 +41,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. int XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) { - GiveUp(1); + if (dev != inputInfo.keyboard) + GiveUp(1); + return 0; } diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 8ddbdba3d..6edac292e 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -561,6 +561,9 @@ _XkbFilterPointerMove( XkbSrvInfoPtr xkbi, int x,y; Bool accel; + if (xkbi->device == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ filter->keycode = keycode; filter->active = 1; @@ -601,6 +604,9 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { + if (xkbi->device == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ int button= pAction->btn.button; @@ -980,8 +986,11 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { + DeviceIntPtr dev = xkbi->device; + if (dev == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ - DeviceIntPtr dev = xkbi->device; filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; @@ -1003,8 +1012,11 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { + DeviceIntPtr dev = xkbi->device; + if (dev == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ - DeviceIntPtr dev = xkbi->device; filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; @@ -1029,6 +1041,9 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi, DeviceIntPtr dev; int button; + if (dev == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL); if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice())) |