The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Window resize events
Vuhdo


Joined: 08 Jul 2014
Posts: 1
Hello,

How do I distinguish between two types of "window resized" events - when the user manually resizes a window and all the others?
According to the docs, it seems the SDL_WINDOWEVENT_RESIZED event is what I need ("the size was changed by an external event, i.e. the user or the window manager"),
but still it's being triggered by the library's SDL_SetWindowFullscreen() calls.

Thanks!
Window resize events
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
SDL_WINDOWEVENT_RESIZED is what you want. Unfortunately we don't currently know in advance what window size setting fullscreen mode will actually give you, so we don't hide that event from you.


If that's a real problem for your code, feel free to dig into SDL code and see if it's possible to predict the fullscreen size and set window->w/h to the predicted value and see if that works for you.



On Tue, Jul 8, 2014 at 10:08 PM, Vuhdo wrote:
Quote:
Hello,

How do I distinguish between two types of "window resized" events - when the user manually resizes a window and all the others?
According to the docs, it seems the SDL_WINDOWEVENT_RESIZED event is what I need ("the size was changed by an external event, i.e. the user or the window manager"),
but still it's being triggered by the library's SDL_SetWindowFullscreen() calls.

Thanks!


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org