Re: [hatari-devel] Some buttons are not deselected / accepted

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 4.9.2021 0.19, Miro Kropáček wrote:
Mystery solved. As expected, this was a setup issue, although an
intriguing one. For some reason, in the file dialog (and only there),

File dialog seems to be only one requesting
SDLGui_DoDialog() to notify it of "unknown"
events.


SDL generates a "SDL_KEYMAPCHANGED" event which totally confuses the SDL
GUI handler. Interestingly, it has been added in SDL 2.0.4 so it surely
must be coming only from my system. Why? No clue.

SDL docs say it means that: "keymap changed due
to a system event such as an input language or
keyboard layout change".


Btw that handler is pretty fragile as you can see, one unknown event and we
abort everything, leaving the UI in quite a broken state.

I do not see why.  After file selector processes
(ignores) the unknown event, SDLGui_DoDialog() is
called again.

If that were broken, even mouse wheel and Alt +
cursor keys for scrolling the file list would not
work in the file selector, and they *do*.


Are you getting those SDL_KEYMAPCHANGED events
constantly for some reason?

SDLGui_DoDialog() call is pretty heavy, so it
being swamped with huge queue of useless events
might make file selector unresponsive...


Attached patch fixes my situation, I'll let you decide how to fix this, if
ever.

Fix needs to handle the underlying issue,
not just single event type.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/