X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8da1f9a99ee0ff9493cc7845ec13100cdeac431c..2b0246530d08cf7724d94c70d631c166f9717c2c:/src/univ/winuniv.cpp diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 6d57da70e0..4892f9d8eb 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -17,10 +17,6 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "univwindow.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -142,8 +138,8 @@ bool wxWindow::Create(wxWindow *parent, // when calling the base window Create(). wxWindowBase::SetWindowStyleFlag(style); - // if we should always have a vertical scrollbar, do show it - if ( style & wxALWAYS_SHOW_SB ) + // if we allow or should always have a vertical scrollbar, make it + if ( style & wxVSCROLL || style & wxALWAYS_SHOW_SB ) { #if wxUSE_TWO_WINDOWS SetInsertIntoMain( true ); @@ -156,7 +152,7 @@ bool wxWindow::Create(wxWindow *parent, #endif } - // if we should always have a horizontal scrollbar, do show it + // if we should allow a horizontal scrollbar, make it if ( style & wxHSCROLL ) { #if wxUSE_TWO_WINDOWS @@ -316,7 +312,7 @@ bool wxWindow::DoDrawBackground(wxDC& dc) rect.height = size.y; wxWindow * const parent = GetParent(); - if ( HasTransparentBackground() && parent && parent->ProvidesBackground() ) + if ( HasTransparentBackground() && parent ) { wxASSERT( !IsTopLevel() ); @@ -343,7 +339,7 @@ bool wxWindow::DoDrawBackground(wxDC& dc) } else { - // Draw background ouselves + // Draw background ourselves EraseBackground( dc, rect ); } @@ -1112,12 +1108,12 @@ wxRect wxWindow::ScrollNoRefresh(int dx, int dy, const wxRect *rectTotal) wxMemoryDC dcMem; dcMem.SelectObject(bmp); - dcMem.Blit(wxPoint(0, 0), size, &dc, ptSource + dcMem.Blit(wxPoint(0,0), size, &dc, ptSource #if defined(__WXGTK__) && !defined(wxHAS_WORKING_GTK_DC_BLIT) + GetClientAreaOrigin() #endif // broken wxGTK wxDC::Blit ); - dc.Blit(ptDest, size, &dcMem, wxPoint(0, 0)); + dc.Blit(ptDest, size, &dcMem, wxPoint(0,0)); wxLogTrace(_T("scroll"), _T("Blit: (%d, %d) of size %dx%d -> (%d, %d)"), @@ -1201,7 +1197,7 @@ void wxWindow::OnKeyDown(wxKeyEvent& event) { #if wxUSE_MENUS int key = event.GetKeyCode(); - if ( !event.ControlDown() && (key == WXK_MENU || key == WXK_F10) ) + if ( !event.ControlDown() && (key == WXK_ALT || key == WXK_F10) ) { ms_winLastAltPress = this; @@ -1318,7 +1314,7 @@ void wxWindow::OnChar(wxKeyEvent& event) void wxWindow::OnKeyUp(wxKeyEvent& event) { int key = event.GetKeyCode(); - if ( !event.HasModifiers() && (key == WXK_MENU || key == WXK_F10) ) + if ( !event.HasModifiers() && (key == WXK_ALT || key == WXK_F10) ) { // only process Alt release specially if there were no other key // presses since Alt had been pressed and if both events happened in