[AD] [5.1] Patch to fix double SWITCH_IN event on Windows

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


The bug in question is described in this thread: http://www.allegro.cc/forums/thread/609271

When a display window is minimized and then restored, it generates two SWITCH_IN events in Windows. Apparently, this is because Windows sends two WM_ACTIVATE messages when a window is restored from being minimized: one when the window is still minimized, and then one when the window has been restored (weird behavior if you ask me). I found this information in a post by Milan in the following thread: http://www.allegro.cc/forums/thread/590937

Apparently it was also a bug in 4.2. Anyway, attached is a patch (generated with svn) that fixes this particular bug in 5.1. I tested it quite a bit to make sure that the MINIMIZED flag was still getting set correctly and that the expected number of SWITCH_IN and SWITCH_OUT events were generated.

As for the other bug discussed in the link (regarding DISPLAY_RESIZE being fired on minimize), I was unable to replicate this in 5.1.

Attachment: switch_in_fix.diff
Description: Binary data



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