X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4eb124f5bd8fd682440dc76a58869cc79f934f17..176d98241020d28c8b7c9220389139e8dbf6a8ea:/src/univ/winuniv.cpp diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index b114729174..215d74028e 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -124,20 +124,26 @@ bool wxWindow::Create(wxWindow *parent, { long actualStyle = style; - // FIXME: may need this on other platforms -#ifdef __WXMSW__ + // we add wxCLIP_CHILDREN to get the same ("natural") behaviour under MSW + // as under the other platforms + actualStyle |= wxCLIP_CHILDREN; + actualStyle &= ~wxVSCROLL; actualStyle &= ~wxHSCROLL; + +#ifdef __WXMSW__ + // without this, borders (non-client areas in general) are not repainted + // correctly when resizing; apparently, native NC areas are fully repainted + // even without this style by MSW, but wxUniv implements client area + // itself, so it doesn't work correctly for us + // + // FIXME: this is very expensive, we need to fix the (commented-out) code + // in OnSize() instead + actualStyle |= wxFULL_REPAINT_ON_RESIZE; #endif - // we add wxCLIP_CHILDREN to get the same ("natural") behaviour under MSW - // as under the other platforms - if ( !wxWindowNative::Create(parent, id, pos, size, - actualStyle | wxCLIP_CHILDREN, - name) ) - { + if ( !wxWindowNative::Create(parent, id, pos, size, actualStyle, name) ) return false; - } // Set full style again, including those we didn't want present // when calling the base window Create().