]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/topluniv.cpp
Fix so OGL can build without wxBuffer
[wxWidgets.git] / src / univ / topluniv.cpp
index c5ffe12df3f0faf8e155292566e5fba6bc6bf7cd..af81456844f98fe5d5440ccd6c2eeda2dfa61cc5 100644 (file)
@@ -2,7 +2,7 @@
 // Name:        topluniv.cpp
 // Author:      Vaclav Slavik
 // Id:          $Id$
-// Copyright:   (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
+// Copyright:   (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -269,6 +269,28 @@ long wxTopLevelWindow::HitTest(const wxPoint& pt) const
     return m_renderer->HitTestFrame(rect, pt+GetClientAreaOrigin(), GetDecorationsStyle());
 }
 
+int wxTopLevelWindow::GetMinWidth() const
+{
+    if ( ms_drawDecorations )
+    {
+        return wxMax(wxTopLevelWindowNative::GetMinWidth(),
+                     m_renderer->GetFrameMinSize(GetDecorationsStyle()).x);
+    }
+    else
+        return wxTopLevelWindowNative::GetMinWidth();
+}
+
+int wxTopLevelWindow::GetMinHeight() const
+{
+    if ( ms_drawDecorations )
+    {
+        return wxMax(wxTopLevelWindowNative::GetMinHeight(),
+                     m_renderer->GetFrameMinSize(GetDecorationsStyle()).y);
+    }
+    else
+        return wxTopLevelWindowNative::GetMinHeight();
+}
+
 // ----------------------------------------------------------------------------
 // icons
 // ----------------------------------------------------------------------------
@@ -658,7 +680,7 @@ bool wxStdFrameInputHandler::HandleMouse(wxInputConsumer *consumer,
                 consumer->PerformAction(wxACTION_TOPLEVEL_BUTTON_PRESS, m_winPressed);
                 return TRUE;
             }
-            else if ( hit & wxHT_TOPLEVEL_TITLEBAR )
+            else if ( (hit & wxHT_TOPLEVEL_TITLEBAR) && !w->IsMaximized() )
             {
                 consumer->PerformAction(wxACTION_TOPLEVEL_MOVE);
                 return TRUE;