diff options
Diffstat (limited to 'freedesktop-bug-865.patch')
-rw-r--r-- | freedesktop-bug-865.patch | 89 |
1 files changed, 45 insertions, 44 deletions
diff --git a/freedesktop-bug-865.patch b/freedesktop-bug-865.patch index cd4d644ad668..e3a9839530ee 100644 --- a/freedesktop-bug-865.patch +++ b/freedesktop-bug-865.patch @@ -1,6 +1,6 @@ ---- xorg-server-1.14.0/xkb/xkbActions.c.orig 2013-02-08 20:50:40.000000000 +0400 -+++ xorg-server-1.14.0/xkb/xkbActions.c 2013-03-18 22:00:20.113844672 +0400 -@@ -339,23 +339,82 @@ +--- xorg-server-1.18.0/xkb/xkbActions.c.orig 2015-11-22 18:31:15.749839635 +0300 ++++ xorg-server-1.18.0/xkb/xkbActions.c 2015-11-22 18:39:39.621861737 +0300 +@@ -351,26 +351,83 @@ return 1; } @@ -14,7 +14,7 @@ +{ + XkbGroupAction ga = pAction->group; + if (ga.flags&XkbSA_GroupAbsolute) -+ xkbi->state.locked_group= XkbSAGroup(&ga); ++ xkbi->state.locked_group= XkbSAGroup(&ga); + else xkbi->state.locked_group+= XkbSAGroup(&ga); +} + @@ -22,64 +22,65 @@ + static int -_XkbFilterLockState(XkbSrvInfoPtr xkbi, -+_XkbFilterLockGroup( XkbSrvInfoPtr xkbi, ++_XkbFilterLockGroup(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { ++ int sendEvent = 1; ++ + if (filter->keycode == 0) /* initial press */ + AccessXCancelRepeatKey(xkbi, keycode); + - if (pAction && (pAction->type == XkbSA_LockGroup)) { - if (pAction->group.flags & XkbSA_GroupAbsolute) - xkbi->state.locked_group = XkbSAGroup(&pAction->group); - else - xkbi->state.locked_group += XkbSAGroup(&pAction->group); - return 1; -+ -+ int sendEvent = 1; -+ + if (!xkbSwitchGroupOnRelease()) { -+ xkbUpdateLockedGroup(xkbi, pAction); -+ return sendEvent; ++ xkbUpdateLockedGroup(xkbi, pAction); ++ return sendEvent; + } + + /* Delay switch till button release */ -+ if (filter->keycode==0) { /* initial press */ -+ filter->keycode = keycode; -+ filter->active = 1; -+ filter->filterOthers = 0; /* for what? */ -+ filter->filter = _XkbFilterLockGroup; ++ if (filter->keycode==0) { /* initial press */ ++ filter->keycode = keycode; ++ filter->active = 1; ++ filter->filterOthers = 0; /* for what? */ ++ filter->filter = _XkbFilterLockGroup; + -+ /* filter->priv = 0; */ -+ filter->upAction = *pAction; ++ /* filter->priv = 0; */ ++ filter->upAction = *pAction; + -+ /* Ok, now we need to simulate the action which would go if this action didn't block it. -+ XkbSA_SetMods is the one: it is to set modifier' flag up. */ -+ { -+ XkbStateRec fake_state = xkbi->state; -+ XkbAction act; ++ /* Ok, now we need to simulate the action which would go if this action didn't block it. ++ XkbSA_SetMods is the one: it is to set modifier' flag up. */ ++ { ++ XkbStateRec fake_state = xkbi->state; ++ XkbAction act; + -+ fake_state.mods = 0; -+ act = XkbGetKeyAction(xkbi, &fake_state, keycode); ++ fake_state.mods = 0; ++ act = XkbGetKeyAction(xkbi, &fake_state, keycode); + -+ /* KLUDGE: XkbSA_SetMods only? */ -+ if (act.type == XkbSA_SetMods) { -+ XkbFilterPtr filter = _XkbNextFreeFilter(xkbi); -+ sendEvent = _XkbFilterSetState(xkbi,filter,keycode,&act); -+ } -+ } ++ /* KLUDGE: XkbSA_SetMods only? */ ++ if (act.type == XkbSA_SetMods) { ++ XkbFilterPtr filter = _XkbNextFreeFilter(xkbi); ++ sendEvent = _XkbFilterSetState(xkbi,filter,keycode,&act); ++ } ++ } + } + else { -+ /* do nothing if some button else is pressed */ -+ if (!pAction) -+ xkbUpdateLockedGroup(xkbi, &filter->upAction); -+ filter->active = 0; ++ /* do nothing if some button else is pressed */ ++ if (!pAction) ++ xkbUpdateLockedGroup(xkbi, &filter->upAction); ++ filter->active = 0; } -+ + return sendEvent; +} + +static int -+_XkbFilterLockMods( XkbSrvInfoPtr xkbi, -+ XkbFilterPtr filter, -+ unsigned keycode, -+ XkbAction * pAction) ++_XkbFilterLockMods( XkbSrvInfoPtr xkbi, ++ XkbFilterPtr filter, ++ unsigned keycode, ++ XkbAction * pAction) +{ if (filter->keycode == 0) { /* initial press */ filter->keycode = keycode; @@ -91,17 +92,17 @@ filter->upAction = *pAction; if (!(filter->upAction.mods.flags & XkbSA_LockNoLock)) xkbi->state.locked_mods |= pAction->mods.mask; -@@ -1174,9 +1233,12 @@ +@@ -1250,9 +1307,12 @@ sendEvent = _XkbFilterLatchState(xkbi, filter, key, &act); break; case XkbSA_LockMods: -+ filter = _XkbNextFreeFilter(xkbi); -+ sendEvent=_XkbFilterLockMods(xkbi,filter,key,&act); -+ break; ++ filter = _XkbNextFreeFilter(xkbi); ++ sendEvent=_XkbFilterLockMods(xkbi,filter,key,&act); ++ break; case XkbSA_LockGroup: filter = _XkbNextFreeFilter(xkbi); - sendEvent = _XkbFilterLockState(xkbi, filter, key, &act); -+ sendEvent=_XkbFilterLockGroup(xkbi,filter,key,&act); ++ sendEvent = _XkbFilterLockGroup(xkbi,filter,key,&act); break; case XkbSA_ISOLock: filter = _XkbNextFreeFilter(xkbi); |