[AD] Bug in the GUI routines |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Ok, I found a bug in the GUI routines.
In alinline.h, this function:
AL_INLINE(int, SEND_MESSAGE, (DIALOG *d, int msg, int c),
{
int ret;
if (msg == MSG_DRAW)
acquire_screen();
ret = d->proc(msg, d, c);
if (msg == MSG_DRAW)
release_screen();
if (ret & D_REDRAWME)
d->flags |= D_DIRTY;
return ret;
})
should read:
AL_INLINE(int, SEND_MESSAGE, (DIALOG *d, int msg, int c),
{
int ret;
if (msg == MSG_DRAW)
acquire_screen();
ret = d->proc(msg, d, c);
if (msg == MSG_DRAW)
release_screen();
if (ret & D_REDRAWME) {
d->flags |= D_DIRTY;
ret &= ~D_REDRAWME;
}
return ret;
})
This bug causes the MSG_DCLICK to never occur again whenever a D_REDRAWME was returned by any procedure in the dialog.
Hope this helps.
- GodOfWar