]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/minifram.cpp
Context menu event from keyboard records the mouse position, not -1, -1,
[wxWidgets.git] / src / gtk / minifram.cpp
index a142e6dfcdb1f4166cd18111924d57b99b9c6c36..9febe6584f69dc900adf48144b7f4882c1edb912 100644 (file)
@@ -13,6 +13,7 @@
 #if wxUSE_MINIFRAME
 
 #include "wx/minifram.h"
+#include "wx/gtk/dcclient.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);
 
-#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)
     {
@@ -354,6 +349,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
 
     // 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;