Re: [hatari-devel] Feedback SDL2 support

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


----- Thomas Huth wrote:
> Am Mon, 30 Nov 2015 01:15:53 -0700 (MST)
> schrieb David Savinkoff:
> > 
> > "Keep desktop resolution - Selected" still has a problem of losing
> > window focus on my system. I think SDL2 events become misdirected
> > to hatari's parent process (or whatever window the cursor is over when
> > F11 is pressed) instead of hatari... I noticed that typed keystrokes
> > start showing up in the terminal window where hatari was launched
> > after window focus is lost.
> 
> That's odd. It works fine for on my system. Anyway, could you please
> try these two things independently, to see whether they cure this issue:
> 
> 1)
> 
> Locate this code sequence in screen.c:
> 
> 	if (sdlWindow)
> 	{
> 		SDL_SetWindowSize(sdlWindow, width, height);
> 	}
> 	else
> 	{
> 		sdlWindow = SDL_CreateWindow("Hatari", SDL_WINDOWPOS_UNDEFINED,
> 		                             SDL_WINDOWPOS_UNDEFINED,
> 		                             width, height, sdlVideoFlags);
> 	}
> 
> And replace it with this:
> 
> 	if (sdlWindow)
> 	{
> 		SDL_SetWindowSize(sdlWindow, bInFullScreen ? WWWW : width,
>                                              bInFullScreen ? HHHH : height);
> 	}
> 	else
> 	{
> 		sdlWindow = SDL_CreateWindow("Hatari", SDL_WINDOWPOS_UNDEFINED,
> 		                             SDL_WINDOWPOS_UNDEFINED,
> 		                             bInFullScreen ? WWWW : width,
>                                              bInFullScreen ? HHHH : height,
>                                              sdlVideoFlags);
> 	}
> 
> ... where WWWW is the width of your host screen and HHHH the height
> (i.e. fill in your desktop resolution values).
> 
> 
> 2) If the first experiment does not help, please try to add a 
> 
> 	SDL_RaiseWindow(sdlWindow);
> 
> at the end of the Screen_SetSDLVideoSize() function.
> 
>  Thomas
> 
> 

The first experiment did not help, and doesn't seem to be the issue
because the monitor indicated the resolutions correctly.

The second experiment Did Help, but some problems still remain.
Sometimes the focus is on the wrong window, and sometimes
the fullscreen window is minimized (sometimes I can unminimize
it from the taskbar). And sometimes things actually work!

I Hope that helps.




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