Comment 28 for bug 192508

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

I spent some time investigating this and found some weird code that I don't
understand:

xkbi->desc->ctrls->ctrls_enabled is a bitmask of the enabled features. If I
disable MouseKeys for a device, bit 0x16 is set to 0.

from xkb/xkbActions.c:_XkbFilterControls

--------------------------
        [...]

 change= XkbActionCtrls(&pAction->ctrls); /* 16 for mouse keys */

        [...]

 if (pAction->type==XkbSA_LockControls) {
     filter->priv= (ctrls->enabled_ctrls&change);
     change&= ~ctrls->enabled_ctrls; /* change stays 16 */
 }

 if (change) { /* always true */
     xkbControlsNotify cn;
     XkbSrvLedInfoPtr sli;

     ctrls->enabled_ctrls|= change; /* yay - re-enabled it */

            [...]
------------------

once this code is run, enabled_ctrls has XkbMouseKeysMask is set, no matter what.
This code hasn't changed in years, so I don't really see how that has ever
worked in the first place.