X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a756f210019dd5b51331b7181c816d3882146a30..d86ab8e29f25edc23e99725f7474c95120e8f862:/src/motif/window.cpp diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 30a1b00391..3d778a7fa6 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -713,7 +713,7 @@ wxString wxWindow::GetTitle() const return wxString(title); } -void wxWindow::CaptureMouse() +void wxWindow::DoCaptureMouse() { g_captureWindow = this; if ( m_winCaptured ) @@ -726,7 +726,7 @@ void wxWindow::CaptureMouse() m_winCaptured = TRUE; } -void wxWindow::ReleaseMouse() +void wxWindow::DoReleaseMouse() { g_captureWindow = NULL; if ( !m_winCaptured ) @@ -817,8 +817,9 @@ int wxWindow::GetScrollRange(int orient) const Widget scrollBar = (Widget)GetScrollbar((wxOrientation)orient); wxCHECK_MSG( scrollBar, 0, "no such scrollbar" ); - int range; - XtVaGetValues(scrollBar, XmNmaximum, &range, NULL); + int range = 0; + if (scrollBar) + XtVaGetValues(scrollBar, XmNmaximum, &range, NULL); return range; } @@ -1366,17 +1367,6 @@ wxPoint wxWindow::GetClientAreaOrigin() const return wxPoint(0, 0); } -// Makes an adjustment to the window position (for example, a frame that has -// a toolbar that it manages itself). -void wxWindow::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) -{ - if (((sizeFlags & wxSIZE_NO_ADJUSTMENTS) == 0) && GetParent()) - { - wxPoint pt(GetParent()->GetClientAreaOrigin()); - x += pt.x; y += pt.y; - } -} - void wxWindow::SetSizeHints(int minW, int minH, int maxW, int maxH, int incW, int incH) { m_minWidth = minW; @@ -2147,12 +2137,13 @@ static void wxCanvasInputEvent(Widget drawingArea, case KeyPress: { KeySym keySym; + static char buf[100]; #if 0 XComposeStatus compose; - (void) XLookupString ((XKeyEvent *) & local_event, wxBuffer, 20, &keySym, &compose); + (void) XLookupString ((XKeyEvent *) & local_event, buf, 20, &keySym, &compose); #endif // 0 - (void) XLookupString ((XKeyEvent *) & local_event, wxBuffer, 20, &keySym, NULL); + (void) XLookupString ((XKeyEvent *) & local_event, buf, 20, &keySym, NULL); int id = wxCharCodeXToWX (keySym); wxEventType eventType = wxEVT_CHAR; @@ -2200,8 +2191,9 @@ static void wxCanvasInputEvent(Widget drawingArea, } case KeyRelease: { + static char buf[100]; KeySym keySym; - (void) XLookupString ((XKeyEvent *) & local_event, wxBuffer, 20, &keySym, NULL); + (void) XLookupString ((XKeyEvent *) & local_event, buf, 20, &keySym, NULL); int id = wxCharCodeXToWX (keySym); wxKeyEvent event (wxEVT_KEY_UP);