Some more information about the infinite loop: It looks like
- gtk+ receives a keypress (Ctrl)
- gedit sees the event, and propagates it to the TextView,
which calls XFilterEvent()
- XFilterEvent() forwards the event to scim and returns FALSE.
- A fabricated event then arrives from scim
- gedit sends this to XFilterEvent()
- xim ignores this event, since it knows that it was fabricated
- gedit then sends the event once again to XFilterEvent()
- xim doesn't think this one is fabricated, so it forwards it to scim
- a fabricated event arrives, and gedit once again filters it twice.
So the root of the infinite loop bug is that gedit calls XFilterEvent() twice
for a single event. Or maybe the root cause is that XIM thinks generating events
behind the application's back is not stupid.
Some more information about the infinite loop: It looks like
- gtk+ receives a keypress (Ctrl)
- gedit sees the event, and propagates it to the TextView,
which calls XFilterEvent()
- XFilterEvent() forwards the event to scim and returns FALSE.
- A fabricated event then arrives from scim
- gedit sends this to XFilterEvent()
- xim ignores this event, since it knows that it was fabricated
- gedit then sends the event once again to XFilterEvent()
- xim doesn't think this one is fabricated, so it forwards it to scim
- a fabricated event arrives, and gedit once again filters it twice.
So the root of the infinite loop bug is that gedit calls XFilterEvent() twice
for a single event. Or maybe the root cause is that XIM thinks generating events
behind the application's back is not stupid.