Re: Some WinRT strangeness with reported window size

hardcoredaniel <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
Hi David,

I'm sorry for having you bothered with an issue that you could not have 
reproduced due to missing information. After thinking about your 
observations it occurred to me that some time ago I tried to implement some 
workaround for the issue that the SDL app will not reliably start (resp 
change to) fullscreen mode on PCs.

What I did was to add some code in my app to react on the window event "SDL_
WINDOWEVENT_SHOWN" and to call "SDL_SetWindowFullscreen" with SDL_TRUE as 2
nd parameter.

This worked well at app start, so that I forgot about this trick. 
However, when restoring a minimized app that I changed to windowed mode 
before, the system is not going to fullscreen despite that call (I'm not 
sure whether or whom to blame, because I intentionally left fullscreen mode 
before minimizing the window). 
As the call to "SetWindowFullscreen" cannot return success/failure, SDL 
doesn't know about this and so probably assumes fullscreen was ok and sends 
the SDL_WINDOWEVENT_RESIZED with the fullscreen coords.

So maybe I will have to modify the SDL sources myself to add a return code 
to SetWindowFullscreen, return hard-coded success for all other platforms, 
and success/failure for WinRT only. I remember your comment about such a 
change not suiting all platforms where the success/failure of such operation
is reported asynchronously. Yet I have no other idea how to handle it.

BTW: Can you reproduce the width/height parameter inconsistency on the 
mobile platform? Or is there a relation to my workaround as well?

Regards,

Daniel


---------- Původní zpráva ----------
Od: DLudwig <[email protected]>
Komu: [email protected]
Datum: 15. 10. 2016 20:07:53
Předmět: Re: [SDL] Some WinRT strangeness with reported window size

"


                                      
                                      
                                      
                                      
                                      
                                      
                                      
                                      
                                      
                          hardcoredaniel wrote:	 
It will launch in fullscreen. When you resize it to windowed mode, change it
to say 50% of its fullscreen size, minimize it, and then restore, it will 
display in invalid size. If you start resizing the window again, it'll 
immediately use the proper size.
                                     	 
                                      
                                      

I see the bug reproduce in that app, but not in my own code. I've tried 
checking various SDL outputs as well (window size, renderer output size, 
viewport, and a few other things), and am not yet seeing any discrepencies.

Do you have sample code that I could try building + testing against, 
preferably something dependency-free and single-file?

-- David L.

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org"

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.