Re: [hatari-devel] Feedback SDL2 support

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


Le 25/05/2015 19:23, Eero Tamminen a écrit :
Hi,

On maanantai 25 toukokuu 2015, Nicolas Pomarède wrote:
regarding this 3rd point with the window (not mouse) position, this is
handled by the window manager, not by the application (hatari) itself.

Actually, Hatari SDL2 code seems to create another window when
switching between fullscreen and windowed mode.  This happens
when requested width & height are different, and with SDL2,
Hatari seems to use full display size when fullscreen is
requested.

When it's a new window, window manager cannot associate it
with position of some other, older window.


I see the same behaviour with SDL1 : if I go fullscreen with F11 and
press F11 again, hatari 's window position is changed.
If I have another window on the same screen, it might even changed too.

I don't think this is SDL1/2 specific, it's up to the window manager to
handle the windows' position and to restore them after processing a
fullscreen request ; some WM will handle it better than others AFAIK (in
my case, KDE doesn't handle it very well)

In SDL1 case, Hatari just sets new mode.  What happens
depends on SDL.


As far as I remember, by default X11 applications/windows doesn't have access to their absolute coordinates on screen (unlike under Windows for example). There were some extensions to add support for this between X11 and the window managers, but I'm not sure it's correctly handled everywhere.

In SDL, you set a new video mode when going fullscreen, then you tell SDL to restore the previous mode when exiting fullscreen, then the WM might screw windows layout because it tried to recompute windows positions when going 640x400 for example, and when you go back to 1280x1024, the positions will be (more or less) those of the 640x400 screen you had.

My guess is that depending on the window layout of the Window manager (automatic, best fit, tiled, ...) we will get different results. One would need to check SDL 1 or 2 API to see if there're calls to get the absolute window's position and to force Hatari's window.

Nicolas





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