Re: [AD] windows resizing regression |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 9 Nov 2010, at 7:10 , Elias Pschernig wrote:
> Getting ALLEGRO_EVENT_DISPLAY_RESIZE events in response to al_resize_display can be nice since you could handle all resizes in your event handler, whether it's a user-initiated or program-initiated resize. At the same time there's no need to require an al_acknowledge_resize after al_resize_display.
But then you're not really handling anything, are you? :P
> As far as I understand the behavior right now is:
>
> X11: al_resize_display resizes immediately, but also sends the event (and calling al_acknowledge_resize does no harm)
> OSX: same but no event is sent
> Windows: event is sent and resize only happens after al_acknowledge_resize
>
> Just inferring this all from the thread, I have no idea how it actually works.
That's my impression of how it works.
Either way, "fixing" the X11 port to get the correct behaviour (whatever it is) isn't a large priority. If we keep to "no al_acknowledge_resize() needed after a progammatic resize", then all it does is send a superfluous resize event. I can live with that for now.
All that would be needed on the Windows port is for al_resize_display() to explicitly acknowledge the resize at the end of the function, which is how it's done on OS X and X11 anyway. In fact, we could fall back to doing that in the platform-neutral part of the API and make sure all platforms (now and future) will behave in the same way. There's arguments against that though (it makes things a bit more obscure from the platform-specific level, since Allegro will do things that affect the behaviour of the code you wrote behind your back), so I'm not sure if I would advocate that.
I appreciate this is all very annoying and frustrating, but in the grand scheme of things, these are all relatively minor issues. If 5.0.0 has a few rough spots like this, soit. We can release 5.0.1 a week later if we have to. Unit tests are great, but they won't catch this kind of thing. The only way to find them is for people to actually use the library, which more and more people are now doing. That's a good thing. I think we should all remember that.
Evert