]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/notebook.cpp
More colour finetuning
[wxWidgets.git] / src / motif / notebook.cpp
index 00729a08ed246c47cdffa0236175e6f2c80a7671..4523b93e0576da8797c6fc597b6f9f06098933ef 100644 (file)
@@ -48,6 +48,7 @@ BEGIN_EVENT_TABLE(wxNotebook, wxControl)
     EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent)
     EVT_SET_FOCUS(wxNotebook::OnSetFocus)
     EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
+    EVT_IDLE(wxNotebook::OnIdle)
 END_EVENT_TABLE()
 
 IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
@@ -392,6 +393,33 @@ void wxNotebook::OnSize(wxSizeEvent& event)
     event.Skip();
 }
 
+// This was supposed to cure the non-display of the notebook
+// until the user resizes the window.
+// What's going on?
+void wxNotebook::OnIdle(wxIdleEvent& event)
+{
+    static bool s_bFirstTime = TRUE;
+    if ( s_bFirstTime ) {
+      /*
+      wxSize sz(GetSize());
+      sz.x ++;
+      SetSize(sz);
+      sz.x --;
+      SetSize(sz);
+      */
+
+      /*
+      wxSize sz(GetSize());
+      wxSizeEvent sizeEvent(sz, GetId());
+      sizeEvent.SetEventObject(this);
+      GetEventHandler()->ProcessEvent(sizeEvent);
+      Refresh();
+      */
+      s_bFirstTime = FALSE;
+    }
+    event.Skip();
+}
+
 // Implementation: calculate the layout of the view rect
 // and resize the children if required
 bool wxNotebook::RefreshLayout(bool force)