]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/minifram.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / gtk / minifram.cpp
index 7cdf1b9f6235d459975cecdb3cb83b61bd4e73db..ed003a902c7edd95595690d35e7f67dd93e0e319 100644 (file)
@@ -13,6 +13,7 @@
 #if wxUSE_MINIFRAME
 
 #include "wx/minifram.h"
 #if wxUSE_MINIFRAME
 
 #include "wx/minifram.h"
+#include "wx/gtk/dcclient.h"
 
 #ifndef WX_PRECOMP
     #include "wx/settings.h"
 
 #ifndef WX_PRECOMP
     #include "wx/settings.h"
@@ -73,15 +74,9 @@ static gboolean gtk_window_own_expose_callback(GtkWidget* widget, GdkEventExpose
 
     wxClientDC dc(win);
 
 
     wxClientDC dc(win);
 
-#if wxUSE_NEW_DC
-    wxImplDC *impl = dc.GetImpl();
-    wxGTKClientImplDC *client_impl = wxDynamicCast( impl, wxGTKClientImplDC );
-    // Hack alert
-    client_impl->m_window = widget->window;
-#else
-    // Hack alert
-    dc.m_window = widget->window;
-#endif
+    wxDCImpl *impl = dc.GetImpl();
+    wxClientDCImpl *gtk_impl = wxDynamicCast( impl, wxClientDCImpl );
+    gtk_impl->m_gdkwindow = widget->window; // Hack alert
 
     if (style & wxRESIZE_BORDER)
     {
 
     if (style & wxRESIZE_BORDER)
     {
@@ -352,10 +347,6 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
     if (style & wxRESIZE_BORDER)
        m_gdkFunc = GDK_FUNC_RESIZE;
 
     if (style & wxRESIZE_BORDER)
        m_gdkFunc = GDK_FUNC_RESIZE;
 
-    // need to reset default size after changing m_gdkDecor
-    gtk_window_set_default_size(GTK_WINDOW(m_widget), m_width, m_height);
-    m_decorSize.Set(0, 0);
-
     // don't allow sizing smaller than decorations
     GdkGeometry geom;
     geom.min_width  = 2 * m_miniEdge;
     // don't allow sizing smaller than decorations
     GdkGeometry geom;
     geom.min_width  = 2 * m_miniEdge;