Re: [AD] (5.1) Mac OSX Tracking Rectangle Patch

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


On Mon, 2 Jul 2012 21:49:29 -0400
Dennis <dgooden@xxxxxxxxxx> wrote:

> First time contributing, I hope this is the correct procedure.
> 

Hi, and thanks, very rare seeing someone report bugs here, let alone
with a working patch.

> In OSX, the tracking rectangle isn't recalculated when a window is
> resized. This means events like ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY and
> ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY don't work properly. They trigger on
> the original size of the window when it was created, instead of the
> new size after resizing.
> 

I can confirm the problem in ex_display_events. After resizing the
window I seem to get correct LEAVE events, but only sporadic ENTER
events. Instead there's often several LEAVE events without any ENTER in
between.

After the patch it all works fine. I don't know the OSX code and didn't
read up on what a tracking rectangle is, but seeing the previous TODO
there and how it fixes the problem, I committed it.

> Attached is a simple patch to fix this problem. I just used an svn
> diff to make it, not sure if that is preferable or if diff -u would be
> better.
> 

Thanks again for the patch. It applied with git apply, which is all
that's important to me.




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