[AD] [ alleg-Bugs-2388441 ] design bug with al_acknowledge_resize

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


Bugs item #2388441, was opened at 2008-12-04 23:52
Message generated for change (Comment added) made by tjaden
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2388441&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 4.9
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Peter Wang (tjaden)
Assigned to: Nobody/Anonymous (nobody)
Summary: design bug with al_acknowledge_resize

Initial Comment:
Peter Hull pointed out a problem with the design of
al_acknowledge_resize() a while ago.  Two resize events may come in
without an intervening call to al_acknowledge_resize().  The user may
think he is responding to the first resize event, whereas Allegro is
likely to think he is responding to the second event.

I'm not sure what the practical consequences would really be; probably
none, as the user is likely to see the second resize event pretty
quickly anyway.  But we should decide what we want to do about it,
even if it's just documenting it.


----------------------------------------------------------------------

>Comment By: Peter Wang (tjaden)
Date: 2010-02-09 22:27

Message:
After further thought, this is the nature of asynchronous events so I'm
just documenting it.

----------------------------------------------------------------------

Comment By: Peter Wang (tjaden)
Date: 2008-12-10 15:47

Message:
Which queue would you remove them from?  All of them?  It doesn't
sound very nice.

What if we remove the width, height fields from the resize event,
then let al_acknowledge_resize() to return the new size of the display,
and whether a resize actually took place.  Say,

bool al_acknowledge_resize(ALLEGRO_DISPLAY *display,
    int *ret_width, int *ret_height);

It would always returns the dimensions for the "latest" resize event.
If there is no resize pending, it returns false.  Resize events
become a hint that al_acknowledge_resize() is (might be) required.


----------------------------------------------------------------------

Comment By: Thomas Fjellstrom (strangemoose)
Date: 2008-12-10 15:31

Message:
event queues are fifo right? The resize event would really want to say
"take the last available resize event and discard the rest". Or somehow
have the event system allow "merging" of events, so when ever a new resize
event is added, the first existing resize event is changed to reflect the
new info.

----------------------------------------------------------------------

Comment By: Evert Glebbeek (eglebbk)
Date: 2008-12-10 15:19

Message:
Can we pop resize events that are still in the queue?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2388441&group_id=5665




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