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

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


Mystery solved. As expected, this was a setup issue, although an intriguing one. For some reason, in the file dialog (and only there), my 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.

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.

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

On Thu, 2 Sept 2021 at 21:01, Miro Kropáček <miro.kropacek@xxxxxxxxx> wrote:
On Thu, 2 Sept 2021 at 20:48, Eero Tamminen <oak@xxxxxxxxxxxxxx> wrote:
Miro, what's your SDL version?
As mentioned, 2.0.16. However don't take my word for the fact that it's SDL which is the culprit here. I'm on latest KDE, if anyone has similar setup. The most puzzling part for me is the fact that it doesn't happen on *every* button nor in *every* dialog. To me it looks like that only the file selector is broken. 

--


--
http://mikro.atari.org
diff --git a/src/gui-sdl/sdlgui.c b/src/gui-sdl/sdlgui.c
index fe7b0dd5..a2119d77 100644
--- a/src/gui-sdl/sdlgui.c
+++ b/src/gui-sdl/sdlgui.c
@@ -1382,6 +1382,9 @@ int SDLGui_DoDialog(SGOBJ *dlg, SDL_Event *pEventOut, bool KeepCurrentObject)
 				}
 				break;
 
+			case SDL_KEYMAPCHANGED:
+				break;
+
 			 default:
 				if (pEventOut)
 					retbutton = SDLGUI_UNKNOWNEVENT;


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