Comment 6 for bug 292260

Eugene (lisitsky) wrote :

I have the same trouble - swiching occurs on press, but not on release.
I looked events with xev utility:

$ xevKeyPress event, serial 34, synthetic NO, window 0x4600001,
    root 0x7b, subw 0x0, time 52934768, (315,42), root:(1081,421),
    state 0x2000, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x4600001,
    root 0x7b, subw 0x0, time 52935785, (315,42), root:(1081,421),
    state 0x2004, keycode 50 (keysym 0xfe0a, ISO_Prev_Group), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

PropertyNotify event, serial 34, synthetic NO, window 0x4600001,
    atom 0x161 (XKLAVIER_STATE), time 52935792, state PropertyNewValue
                                                                                                                                           <--- layout changes here
PropertyNotify event, serial 34, synthetic NO, window 0x4600001,
    atom 0x161 (XKLAVIER_STATE), time 52935796, state PropertyNewValue

KeyRelease event, serial 34, synthetic NO, window 0x4600001,
    root 0x7b, subw 0x0, time 52936895, (315,42), root:(1081,421),
    state 0x4, keycode 50 (keysym 0xfe0a, ISO_Prev_Group), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x4600001,
    root 0x7b, subw 0x0, time 52940025, (315,42), root:(1081,421),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
...

Is it possible to fix this? To move switch to KeyRelease event?