[AD] 2 patches

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


Hey, I've found a little time to work on Allegro :)

First one adds XCRP and YCRP properties to an object that was cropped.
This helps know where exactly to draw a sprite that would have had
transparent
borders should it have not be cropped (hmm, I'm adventuring in difficult
english
here, hope that does not hurt native speakers' ears tioo much).
I'm actually wondering if I'll add to it to always crop BITMAPs with these
properties when they're updated.

Second one prevents Allegro from sending MSG_DRAW messages to hidden
widgets.
I've spent many hours of debugging before finding it was here :)
It happens where you hide a widget which has the focus: next time you click
on another widget, the previous one will be sent a MSG_LOSTFOCUS (or
equivalent)
and will most probably mark itself as dirty (at least in my implementation
;)).
The clean way, IMHO, would be to add a routine to relinquish focus before
hiding. But there is no such thing at present, and emulating it would
require
to change all widgets to be aware of this...

--
Lyrian

Attachment: crop_properties.diff
Description: Binary data

Attachment: draw_hidden.diff
Description: Binary data



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