REBAR: prevent recursions with WM_SIZE reason

Mike McCormack mike at codeweavers.com
Wed Mar 17 00:56:53 CST 2004


ChangeLog:
* prevent recursions with WM_SIZE reason
-------------- next part --------------
Index: dlls/comctl32/rebar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/rebar.c,v
retrieving revision 1.89
diff -u -r1.89 rebar.c
--- dlls/comctl32/rebar.c	16 Mar 2004 19:14:30 -0000	1.89
+++ dlls/comctl32/rebar.c	17 Mar 2004 06:10:36 -0000
@@ -204,6 +204,7 @@
 #define HAS_GRIPPER    0x00000001
 #define HAS_IMAGE      0x00000002
 #define HAS_TEXT       0x00000004
+#define SIZING_BAND    0x00000008
 
 /* fDraw flags */
 #define DRAW_GRIPPER    0x00000001
@@ -4387,6 +4388,10 @@
 {
     RECT rcClient;
 
+    /* prevent recursion */
+    if(infoPtr->fStatus & SIZING_BAND)
+        return 0;
+
     /* auto resize deadlock check */
     if (infoPtr->fStatus & AUTO_RESIZE) {
 	infoPtr->fStatus &= ~AUTO_RESIZE;
@@ -4474,7 +4479,9 @@
 	(infoPtr->calcSize.cy != rcClient.bottom))
 	infoPtr->fStatus |= BAND_NEEDS_LAYOUT;
 
+    infoPtr->fStatus = SIZING_BAND;
     REBAR_Layout (infoPtr, &rcClient, TRUE, TRUE);
+    infoPtr->fStatus &= ~SIZING_BAND;
     infoPtr->fStatus &= ~AUTO_RESIZE;
 
     return 0;


More information about the wine-patches mailing list