xkb: _XkbFilterRedirectKey needs to pass InternalEvents down.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
085d503608
commit
0b4066c116
|
@ -798,7 +798,7 @@ _XkbFilterRedirectKey( XkbSrvInfoPtr xkbi,
|
||||||
unsigned keycode,
|
unsigned keycode,
|
||||||
XkbAction * pAction)
|
XkbAction * pAction)
|
||||||
{
|
{
|
||||||
xEvent ev;
|
DeviceEvent ev;
|
||||||
int x,y;
|
int x,y;
|
||||||
XkbStateRec old;
|
XkbStateRec old;
|
||||||
unsigned mods,mask;
|
unsigned mods,mask;
|
||||||
|
@ -813,9 +813,11 @@ ProcessInputProc backupproc;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
GetSpritePosition(inputInfo.pointer, &x,&y);
|
GetSpritePosition(inputInfo.pointer, &x,&y);
|
||||||
ev.u.keyButtonPointer.time = GetTimeInMillis();
|
ev.header = ET_Internal;
|
||||||
ev.u.keyButtonPointer.rootX = x;
|
ev.length = sizeof(DeviceEvent);
|
||||||
ev.u.keyButtonPointer.rootY = y;
|
ev.time = GetTimeInMillis();
|
||||||
|
ev.root_x = x;
|
||||||
|
ev.root_y = y;
|
||||||
|
|
||||||
if (filter->keycode==0) { /* initial press */
|
if (filter->keycode==0) { /* initial press */
|
||||||
if ((pAction->redirect.new_key<xkbi->desc->min_key_code)||
|
if ((pAction->redirect.new_key<xkbi->desc->min_key_code)||
|
||||||
|
@ -829,9 +831,8 @@ ProcessInputProc backupproc;
|
||||||
filter->filter = _XkbFilterRedirectKey;
|
filter->filter = _XkbFilterRedirectKey;
|
||||||
filter->upAction = *pAction;
|
filter->upAction = *pAction;
|
||||||
|
|
||||||
/* XXX: what about DeviceKeyPress */
|
ev.type = ET_KeyPress;
|
||||||
ev.u.u.type = KeyPress;
|
ev.detail.key = pAction->redirect.new_key;
|
||||||
ev.u.u.detail = pAction->redirect.new_key;
|
|
||||||
|
|
||||||
mask= pAction->redirect.vmods_mask;
|
mask= pAction->redirect.vmods_mask;
|
||||||
mods= pAction->redirect.vmods;
|
mods= pAction->redirect.vmods;
|
||||||
|
@ -861,9 +862,8 @@ ProcessInputProc backupproc;
|
||||||
}
|
}
|
||||||
else if (filter->keycode==keycode) {
|
else if (filter->keycode==keycode) {
|
||||||
|
|
||||||
/* XXX: what about DeviceKeyRelease */
|
ev.type = ET_KeyRelease;
|
||||||
ev.u.u.type = KeyRelease;
|
ev.detail.key = filter->upAction.redirect.new_key;
|
||||||
ev.u.u.detail = filter->upAction.redirect.new_key;
|
|
||||||
|
|
||||||
mask= filter->upAction.redirect.vmods_mask;
|
mask= filter->upAction.redirect.vmods_mask;
|
||||||
mods= filter->upAction.redirect.vmods;
|
mods= filter->upAction.redirect.vmods;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user