]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
Set the value passed to wxComboBox ctor in wxOSX/Cocoa.
[wxWidgets.git] / src / gtk / window.cpp
index e3fee8bcdf6352ab2d66b18be9e214fd48733153..d2f0b65e63f1f51220a4dba99ce3923d70c21b0c 100644 (file)
@@ -2210,6 +2210,12 @@ wxWindowGTK::~wxWindowGTK()
     // delete before the widgets to avoid a crash on solaris
     delete m_imData;
 
+    // avoid problem with GTK+ 2.18 where a frozen window causes the whole
+    // TLW to be frozen, and if the window is then destroyed, nothing ever
+    // gets painted again
+    if (IsFrozen())
+        DoThaw();
+
     if (m_widget)
     {
         // Note that gtk_widget_destroy() does not destroy the widget, it just
@@ -4440,9 +4446,9 @@ static void wx_frozen_widget_realize(GtkWidget* w, wxWindowGTK* win)
         win
     );
 
-    GdkWindow* window = win->GTKGetDrawingWindow();
-    if (window == NULL)
-        window = w->window;
+    GdkWindow* window = w->window;
+    if (w == win->m_wxwindow)
+        window = win->GTKGetDrawingWindow();
     gdk_window_freeze_updates(window);
 }
 
@@ -4467,9 +4473,9 @@ void wxWindowGTK::GTKFreezeWidget(GtkWidget *w)
         return;
     }
 
-    GdkWindow* window = GTKGetDrawingWindow();
-    if (window == NULL)
-        window = w->window;
+    GdkWindow* window = w->window;
+    if (w == m_wxwindow)
+        window = GTKGetDrawingWindow();
     gdk_window_freeze_updates(window);
 }
 
@@ -4490,9 +4496,9 @@ void wxWindowGTK::GTKThawWidget(GtkWidget *w)
         return;
     }
 
-    GdkWindow* window = GTKGetDrawingWindow();
-    if (window == NULL)
-        window = w->window;
+    GdkWindow* window = w->window;
+    if (w == m_wxwindow)
+        window = GTKGetDrawingWindow();
     gdk_window_thaw_updates(window);
 }