]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
More refreshes are deferred to idle time.
[wxWidgets.git] / src / gtk / toplevel.cpp
index 515d60b61e25ea3886112b3f6ce52141f65227f5..52199f7191e015d88046ee680be9838e35c6f97c 100644 (file)
@@ -146,7 +146,7 @@ gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WX
     if (g_isIdle)
         wxapp_install_idle_handler();
 
-    if (!win->m_hasVMT)
+    if (!win->m_hasVMT || !win->IsShown())
         return FALSE;
 
     int x = 0;
@@ -245,8 +245,13 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev
 {
     GtkPizza *pizza = GTK_PIZZA(widget);
 
-    gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
-                GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1);
+    gtk_paint_flat_box (win->m_widget->style,
+                        pizza->bin_window, GTK_STATE_NORMAL,
+                        GTK_SHADOW_NONE,
+                        &gdk_event->area,
+                        win->m_widget,
+                        (char *)"base",
+                        0, 0, -1, -1);
 
     return TRUE;
 }
@@ -260,8 +265,13 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
 {
     GtkPizza *pizza = GTK_PIZZA(widget);
 
-    gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
-                GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1);
+    gtk_paint_flat_box (win->m_widget->style,
+                        pizza->bin_window, GTK_STATE_NORMAL,
+                        GTK_SHADOW_NONE,
+                        rect,
+                        win->m_widget,
+                        (char *)"base",
+                        0, 0, -1, -1);
 }
 
 // ----------------------------------------------------------------------------
@@ -348,7 +358,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
     wxTopLevelWindows.Append( this );
 
     m_needParent = FALSE;
-
+    
     if (!PreCreation( parent, pos, size ) ||
         !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
     {
@@ -371,7 +381,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
     m_widget = gtk_window_new( win_type );
 
     if (m_parent && (GTK_IS_WINDOW(m_parent->m_widget)) &&
-        (HasFlag(wxFRAME_FLOAT_ON_PARENT) || (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)))
+        (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG))
     {
         gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
     }