X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/17a1ebd101f0653e69736416a2a28d0ada423141..d23ec02c6ab52f60349601be999bab4cf6acbdc4:/src/common/popupcmn.cpp diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index 914fce2d26..3d9f7b0b8d 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -462,8 +462,11 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) wxPoint pos = event.GetPosition(); + // in non-Univ ports the system manages scrollbars for us +#ifdef __WXUNIVERSAL__ // scrollbar on which the click occurred wxWindow *sbar = NULL; +#endif // __WXUNIVERSAL__ wxWindow *win = (wxWindow *)event.GetEventObject(); @@ -504,7 +507,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) case wxHT_WINDOW_VERT_SCROLLBAR: sbar = win->GetScrollbar(wxVERTICAL); break; -#endif +#endif // __WXUNIVERSAL__ default: // forgot to update the switch after adding a new hit test code? @@ -521,6 +524,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) break; } +#ifdef __WXUNIVERSAL__ if ( sbar ) { // translate the event coordinates to the scrollbar ones @@ -533,6 +537,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) (void)sbar->GetEventHandler()->ProcessEvent(event2); } +#endif // __WXUNIVERSAL__ } // ----------------------------------------------------------------------------