]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/win_gtk.c
wxNotebook fixes for Win16; VC++ 4 fixes for OLE files; wxGA_SMOOTH flag (wxMSW);
[wxWidgets.git] / src / gtk1 / win_gtk.c
index 11cae307e183a1e9d726675055d6c60d4b5ecbd1..0477047b3c9db69d77c75d3235255aa08489fe15 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "wx/gtk/win_gtk.h"
 #include "gtk/gtksignal.h"
+#include "gtk/gtknotebook.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -384,8 +385,12 @@ gtk_myfixed_size_request (GtkWidget      *widget,
 
   myfixed = GTK_MYFIXED (widget);
   
+/*
   requisition->width = 0;
   requisition->height = 0;
+*/
+  requisition->width = widget->requisition.width;
+  requisition->height = widget->requisition.height;
 
   children = myfixed->children;
   while (children)
@@ -415,7 +420,8 @@ gtk_myfixed_size_allocate (GtkWidget     *widget,
   g_return_if_fail (allocation != NULL);
 
   myfixed = GTK_MYFIXED (widget);
-
+  
+    widget->allocation = *allocation;
 #if (GTK_MINOR_VERSION > 0)
   if (myfixed->shadow_type == GTK_SHADOW_NONE)
     border = 0;
@@ -425,7 +431,6 @@ gtk_myfixed_size_allocate (GtkWidget     *widget,
   border = 0;
 #endif
 
-  widget->allocation = *allocation;
   if (GTK_WIDGET_REALIZED (widget))
   {
     gdk_window_move_resize( widget->window, 
@@ -443,8 +448,12 @@ gtk_myfixed_size_allocate (GtkWidget     *widget,
     {
       child = children->data;
       children = children->next;
-      
-      if (GTK_WIDGET_VISIBLE (child->widget))
+      /* please look at the text in wxWindow::DoSetSize() on why the
+         test GTK_WIDGET_REALIZED() has to be here */
+      if (GTK_WIDGET_VISIBLE (child->widget) && 
+         !(!GTK_WIDGET_REALIZED(child->widget) &&
+           GTK_IS_NOTEBOOK(child->widget) ))
        {
          child_allocation.x = child->x;
          child_allocation.y = child->y;