X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b225f65995e9eccefe9b502568b1b8e40629cd1a..75cada8e68f31ca6475f238fe506352ccb0783f1:/src/univ/topluniv.cpp diff --git a/src/univ/topluniv.cpp b/src/univ/topluniv.cpp index fff2e484cd..c68373a528 100644 --- a/src/univ/topluniv.cpp +++ b/src/univ/topluniv.cpp @@ -75,9 +75,11 @@ bool wxTopLevelWindow::Create(wxWindow *parent, long styleOrig = 0, exstyleOrig = 0; - // FIXME -- wxUniv should provide a way to force non-native decorations! if ( ms_drawDecorations == -1 ) - ms_drawDecorations = !wxSystemSettings::HasFrameDecorations(); + ms_drawDecorations = !wxSystemSettings::HasFrameDecorations() || + wxGetEnv(wxT("WXDECOR"), NULL); + // FIXME -- wxUniv should provide a way to force non-native decorations! + // $WXDECOR is just a hack in absence of better wxUniv solution if ( ms_drawDecorations ) { @@ -363,13 +365,13 @@ bool wxTopLevelWindow::PerformAction(const wxControlAction& action, ClickTitleBarButton(numArg); return TRUE; } - + else if ( action == wxACTION_TOPLEVEL_MOVE ) { InteractiveMove(wxINTERACTIVE_MOVE); return TRUE; } - + else if ( action == wxACTION_TOPLEVEL_RESIZE ) { int flags = wxINTERACTIVE_RESIZE; @@ -384,7 +386,7 @@ bool wxTopLevelWindow::PerformAction(const wxControlAction& action, InteractiveMove(flags); return TRUE; } - + else return FALSE; } @@ -484,25 +486,25 @@ bool wxStdFrameInputHandler::HandleMouseMove(wxInputConsumer *consumer, } else if ( consumer->GetInputWindow()->GetWindowStyle() & wxRESIZE_BORDER ) { - wxTopLevelWindow *win = wxStaticCast(consumer->GetInputWindow(), + wxTopLevelWindow *win = wxStaticCast(consumer->GetInputWindow(), wxTopLevelWindow); long hit = win->HitTest(event.GetPosition()); - + if ( hit != m_winHitTest ) { m_winHitTest = hit; - + if ( m_borderCursorOn ) { m_borderCursorOn = FALSE; win->SetCursor(m_origCursor); } - + if ( hit & wxHT_TOPLEVEL_ANY_BORDER ) { m_borderCursorOn = TRUE; wxCursor cur; - + switch (hit) { case wxHT_TOPLEVEL_BORDER_N: