]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
call Show(false) from ~wxDialog to call EndModal if the dialog is still modal consist...
[wxWidgets.git] / src / gtk / toplevel.cpp
index 8d08c1a516a7210e147fc3208102bf0affb04dbc..2f08c8dedde010046b150b8932d8fa6808f17471 100644 (file)
@@ -392,17 +392,18 @@ static gboolean property_notify_event(
         Atom type;
         int format;
         gulong nitems, bytes_after;
-        long* data = NULL;
+        guchar* data;
         Status status = XGetWindowProperty(
             gdk_x11_drawable_get_xdisplay(event->window),
             gdk_x11_drawable_get_xid(event->window),
             xproperty,
             0, 4, false, XA_CARDINAL,
-            &type, &format, &nitems, &bytes_after, (guchar**)&data);
+            &type, &format, &nitems, &bytes_after, &data);
         if (status == Success && data && nitems == 4)
         {
+            long* p = (long*)data;
             const wxSize decorSize =
-                wxSize(int(data[0] + data[1]), int(data[2] + data[3]));
+                wxSize(int(p[0] + p[1]), int(p[2] + p[3]));
             if (win->m_decorSize != decorSize)
             {
                 const wxSize diff = decorSize - win->m_decorSize;
@@ -955,6 +956,14 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si
     }
 }
 
+void wxTopLevelWindowGTK::DoSetClientSize(int width, int height)
+{
+    if (m_deferShow && !m_isShown)
+        // Since client size is being explicitly set, don't change it later
+        m_deferShow = false;
+    wxTopLevelWindowBase::DoSetClientSize(width, height);
+}
+
 void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
 {
     wxASSERT_MSG(m_widget, wxT("invalid frame"));