X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8354aa92a177f27ebe55869ecc254e1f6da05331..cb7acf9cc78c309026bed1038631f2663cd90bda:/src/univ/winuniv.cpp?ds=sidebyside diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 56bf92060d..719515c231 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -763,6 +763,12 @@ int wxWindow::GetScrollRange(int orient) const void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect) { +#ifdef __WXX11__ + + wxWindowX11::ScrollWindow( dx, dy, rect ); + +#else + // before scrolling it, ensure that we don't have any unpainted areas Update(); @@ -779,6 +785,8 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect) r = ScrollNoRefresh(0, dy, rect); Refresh(TRUE /* erase bkgnd */, &r); } + +#endif } wxRect wxWindow::ScrollNoRefresh(int dx, int dy, const wxRect *rectTotal) @@ -991,6 +999,22 @@ void wxWindow::OnKeyDown(wxKeyEvent& event) } #endif // wxUSE_MENUS + // if it wasn't in a menu, try to find a button + if ( command != -1 ) + { + wxWindow* child = win->FindWindow(command); + if ( child && wxDynamicCast(child, wxButton) ) + { + wxCommandEvent eventCmd(wxEVT_COMMAND_BUTTON_CLICKED, command); + eventCmd.SetEventObject(child); + if ( child->GetEventHandler()->ProcessEvent(eventCmd) ) + { + // skip "event.Skip()" below + return; + } + } + } + // don't propagate accels from the child frame to the parent one break; }