TODO
author Sam Lantinga <slouken@libsdl.org>
Thu, 17 Apr 2014 22:36:14 -0700
branchSDL-1.2
changeset 8716 0aade9c0203f
parent 1621 f12379c41042
child 1654 0a53c90a37f9
child 1895 c121d94672cb
permissions -rw-r--r--
Fixed bug 2325 - SDL_EnableUNICODE sometimes drops keyboard events completely

Rafał Mużyło

The most annoying part of this bug is that though I've found it in two separate apps, I don't have a trivial testcase for it.

The problem seems to be a condition race, as it's triggered quite randomly (therefore it will be hard to tell whether it really gets fixed, if a probable fix is found).

While it's specific to SDL 1.2, it seems quite similar to the problem described and fixed in http://forums.libsdl.org/viewtopic.php?p=40503.

Now, I should start describing the problem.

A game uses Escape to open menu (the exact key might not be important). Upon opening, it calls SDL_EnableUNICODE(1). Upon closing it calls SDL_EnableUNICODE(0).

I have an IME running.

Game uses SDL_PollEvent to get the events.

If Escape is pressed repeatedly, menu is opened and closed, till it eventually freezes in open state.
"freezes" in this context means "app itself still runs, but no keyboard events are getting delivered (though - for example - mouse events still are)". "getting delivered" should mean "SDL_PollEvent is not receiving any".
If it matters, the last delivered keyboard event is a keypress, the release never arrives.

It seems (no guarantees, due to random nature of the freeze) that unsetting XMODIFIERS (which - AFAIU - will disable IME as far as SDL is concerned) prevents the freeze, therefore the reference to that SDL2 thread.
slouken@0
     1
slouken@0
     2
Wish list for the 1.3 development branch:
slouken@1534
     3
http://bugzilla.libsdl.org/
slouken@0
     4
slouken@0
     5
 * Add mousewheel events (new unified event architecture?)
slouken@0
     6
 * DirectInput joystick support needs to be implemented
slouken@0
     7
 * Be able to enumerate and select available audio and video drivers
slouken@1621
     8
 * Fullscreen video mode support for Mac OS X
slouken@0
     9
 * Explicit vertical retrace wait (maybe separate from SDL_Flip?)
slouken@0
    10
 * Shaped windows, windows without borders
slouken@0
    11
 * Multiple windows, multiple display support
slouken@0
    12
 * SDL_INIT_EVENTTHREAD on Windows and MacOS?
slouken@0
    13
 * Add a timestamp to events
slouken@0
    14
 * Add audio input API
slouken@2
    15
 * Add hardware accelerated scaled blit
slouken@2
    16
 * Add hardware accelerated alpha blits
slouken@2
    17
 * Redesign blitting architecture to allow blit plugins
slouken@0
    18
slouken@0
    19
In the jump from 1.2 to 1.3, we should change the SDL_Rect members to
slouken@0
    20
int and evaluate all the rest of the datatypes.  This is the only place
slouken@0
    21
we should do it though, since the 1.2 series should not break binary
slouken@0
    22
compatibility in this way.
slouken@150
    23
slouken@150
    24
Requests:
slouken@150
    25
 * PCM and CDROM volume control (deprecated, but possible)