diff mac/dw.m @ 1449:632346743f46

Fixed dw_window_redraw() on Windows not recalculating notebook page contents if the notebook size didn't change. Remove notebook page subclass and do the redrawing in _resize_box() itself. Fixed expandable boxes with no contents not consuming any space on OS/2, Windows and Mac. Added invalidated window redraw on entering dw_main() on OS/2, Windows and Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 14 Dec 2011 00:23:30 +0000
parents 0d4fdf646caf
children 4b516ef23b62
line wrap: on
line diff
--- a/mac/dw.m	Sat Dec 10 23:27:21 2011 +0000
+++ b/mac/dw.m	Wed Dec 14 00:23:30 2011 +0000
@@ -2469,19 +2469,25 @@
                 if(pass == 1)
                 {
                     (*depth)++;
-                    
+
                     /* Save the newly calculated values on the box */
                     _resize_box(tmp, depth, x, y, pass);
-                    
+
                     /* Duplicate the values in the item list for use below */
                     thisbox->items[z].width = tmp->minwidth;
                     thisbox->items[z].height = tmp->minheight;
-                
+
+                    /* If the box has no contents but is expandable... default the size to 1 */
+                    if(!thisbox->items[z].width && thisbox->items[z].hsize)
+                       thisbox->items[z].width = 1;
+                    if(!thisbox->items[z].height && thisbox->items[z].vsize)
+                       thisbox->items[z].height = 1;
+
                     (*depth)--;
                 }
             }
         }
-        
+
         /* Precalculate these values, since they will
          * be used used repeatedly in the next section.
          */
@@ -2775,6 +2781,8 @@
 {
     dw_mutex_lock(DWRunMutex);
     DWThread = dw_thread_id();
+    /* Make sure any queued redraws are handled */
+    _dw_redraw(0, FALSE);
     [DWApp run];
     DWThread = (DWTID)-1;
     dw_mutex_unlock(DWRunMutex);
@@ -2799,7 +2807,7 @@
             dw_mutex_lock(DWRunMutex);
             DWThread = curr;
         }
-        /* Process any pending events */
+       /* Process any pending events */
         while(_dw_main_iteration(until))
         {
             /* Just loop */