X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/621b405fb5c7d7a64ac6165a04a96745b52e1cc0..16d865f756b8bc251467139b3b75752219ab97bd:/src/univ/topluniv.cpp diff --git a/src/univ/topluniv.cpp b/src/univ/topluniv.cpp index b324c5ba23..af81456844 100644 --- a/src/univ/topluniv.cpp +++ b/src/univ/topluniv.cpp @@ -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 ///////////////////////////////////////////////////////////////////////////// @@ -211,15 +211,7 @@ void wxTopLevelWindow::DoGetClientSize(int *width, int *height) const if ( ms_drawDecorations ) { int w, h; - // VS: we can't use real client area size in 'rect', because - // wxTLWNative::DoGetClientSize calls GetClientAreaOrigin - // under wxMSW which in turn calls DoGetClientSize... - // inifinite recursion - #if 0 wxTopLevelWindowNative::DoGetClientSize(&w, &h); - #else - w = h = 500; - #endif wxRect rect = wxRect(wxTopLevelWindowNative::GetClientAreaOrigin(), wxSize(w, h)); rect = m_renderer->GetFrameClientArea(rect, @@ -277,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 // ---------------------------------------------------------------------------- @@ -666,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;