Allow first click detection when Stella lost focus.

This commit is contained in:
thrust26 2020-11-12 15:41:40 +01:00
parent 907fc4edf3
commit 42817a6117
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,8 @@ EventHandlerSDL2::EventHandlerSDL2(OSystem& osystem)
}
Logger::debug("EventHandlerSDL2::EventHandlerSDL2 SDL_INIT_JOYSTICK");
#endif
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -91,6 +93,7 @@ void EventHandlerSDL2::pollEvent()
while(SDL_PollEvent(&myEvent))
{
cerr << myEvent.type << endl;
switch(myEvent.type)
{
// keyboard events
@ -198,6 +201,7 @@ void EventHandlerSDL2::pollEvent()
}
case SDL_WINDOWEVENT:
cerr << myEvent.window.event << endl;
switch(myEvent.window.event)
{
case SDL_WINDOWEVENT_SHOWN: