]> git.saurik.com Git - wxWidgets.git/commitdiff
Avoid GTK+ errors when using AUI wxPseudoTransparentFrame hack.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 15 Dec 2009 22:44:54 +0000 (22:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 15 Dec 2009 22:44:54 +0000 (22:44 +0000)
wxPseudoTransparentFrame is not a top level window at all and the code in
wxGTK wxTopLevelWindow::DoSetSizeHints() fails for it when it is called from
wxWindowBase::CreateBase() because of it and spits GTK+ errors as it calls
gtk_window_set_geometry_hints() with NULL widget.

Fix this by simply skipping wxTopLevelWindow implementation of this method in
wxPseudoTransparentFrame. A better fix would be to get rid of this hack
completely, of course.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/framemanager.cpp

index 7a580981e4eef3ab06c2ef00cbee0e57c57b70ca..cd0eebc4f96768c9089d131039552f9a16964fdf 100644 (file)
@@ -277,6 +277,16 @@ public:
         return true;
     }
 
+protected:
+    virtual void DoSetSizeHints( int minW, int minH,
+                                 int maxW, int maxH,
+                                 int incW, int incH)
+    {
+        // the real wxFrame method doesn't work for us because we're not really
+        // a top level window so skip it
+        wxWindow::DoSetSizeHints(minW, minH, maxW, maxH, incW, incH);
+    }
+
 private:
     DECLARE_DYNAMIC_CLASS(wxPseudoTransparentFrame)
 };