[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] window resizing
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Sun, 19 Dec 2004 17:34:11 -0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=a41gz3+EKEhEjs9SFn+5QbHxha9sSOYqz2ZgVsJCzfPm33FYK6G+hDFmrHuN+X4/Bliy1jmWCLX9DdMoHyP1fosZm4z+0bDIq5J0hRTooVnljj6m+DW8fqZf/1l+n0fFFn2yYLcFCpRaxLbYoitS/OTAX4m4CqX7aiguK4aAv0Q=
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.