Re: [AD] window resizing

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Jon Rafkind wrote:
I reverted the patch back to where width and height are passed into the callback instead of the callback using SCREEN_W and SCREEN_H. I also added allow_screen_resize() and disallow_screen_resize() methods that the user can call. disallow_screen_resize() is called right after set_gfx_mode so the user has to explicitly enable window resizing. In this case, the user should be aware that they have to use acquire_screen and release_screen around the usage of screen.

Why don't you disable screen resizing when the user-supplied callback is NULL, and enable it when it's not NULL? With your way, the user would have to continually call allow_window_resize after setting the gfx mode, even though they have a callback installed.

I can't think of a reason why a user would have a callback and not want to be able to resize, and I think it's rare (if not bad form) to have the window resizable but not have a callback installed.




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