X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34e8f09728ccbc0929cc4da77a9e47d13634eb14..4b61c88d55f71d59affa4e57df52c99cdaaa5c08:/src/motif/window.cpp diff --git a/src/motif/window.cpp b/src/motif/window.cpp index fb6a636e1a..5722b2175a 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -564,7 +564,7 @@ void wxWindow::SetFocus() } // Get the window with the focus -wxWindow *wxWindowBase::FindFocus() +wxWindow *wxWindowBase::DoFindFocus() { // TODO Problems: // (1) Can there be multiple focussed widgets in an application? @@ -1075,6 +1075,12 @@ void wxWindow::DoSetToolTip(wxToolTip * WXUNUSED(tooltip)) bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y) { + if ( x == -1 && y == -1 ) + { + wxPoint mouse = ScreenToClient(wxGetMousePosition()); + x = mouse.x; y = mouse.y; + } + Widget widget = (Widget) GetMainWidget(); /* The menuId field seems to be usused, so we'll use it to @@ -1596,7 +1602,7 @@ void wxWindow::DoPaint() // otherwise we don't know how many pixels have been scrolled. We might // solve this in the future by defining virtual wxWindow functions to get // the scroll position in pixels. Or, each kind of scrolled window has to - // implement backing stores itself, using generic wxWindows code. + // implement backing stores itself, using generic wxWidgets code. wxScrolledWindow* scrolledWindow = wxDynamicCast(this, wxScrolledWindow); if ( scrolledWindow ) { @@ -1667,7 +1673,7 @@ void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event) if ( win->GetParent() ) { wxSysColourChangedEvent event2; - event.m_eventObject = win; + event.SetEventObject(win); win->GetEventHandler()->ProcessEvent(event2); } @@ -1764,7 +1770,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event) // ============================================================================ // ---------------------------------------------------------------------------- -// function which maintain the global hash table mapping Widgets to wxWindows +// function which maintain the global hash table mapping Widgets to wxWidgets // ---------------------------------------------------------------------------- bool wxAddWindowToTable(Widget w, wxWindow *win) @@ -2333,7 +2339,7 @@ bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, int x2, y2; win->GetPosition(&x2, &y2); - // The button x/y must be translated to wxWindows + // The button x/y must be translated to wxWidgets // window space - the widget might be a label or button, // within a form. int dx = 0;