X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ab377bd1ad4b6a2568cf1ac8b0f6e6b52a004d4..c15d098cdffb0eae6a5d1b92a1a9655ed428f486:/src/motif/window.cpp?ds=sidebyside diff --git a/src/motif/window.cpp b/src/motif/window.cpp index f7ed6cb2bb..cebde640e5 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -117,9 +117,9 @@ static int str16len(const char *s) // ---------------------------------------------------------------------------- #if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) + IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase) - BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) + BEGIN_EVENT_TABLE(wxWindow, wxWindowBase) EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) EVT_IDLE(wxWindow::OnIdle) END_EVENT_TABLE() @@ -1384,12 +1384,12 @@ void wxWindow::GetTextExtent(const wxString& string, fontToUse = (wxFont *) & m_font; wxCHECK_RET( fontToUse->Ok(), "valid window font needed" ); - + WXFontStructPtr pFontStruct = theFont->GetFontStruct(1.0, GetXDisplay()); int direction, ascent, descent2; XCharStruct overall; - int slen; + int slen = string.Len(); #if 0 if (use16) @@ -1408,6 +1408,7 @@ void wxWindow::GetTextExtent(const wxString& string, *descent = descent2; if (externalLeading) *externalLeading = 0; + } // ---------------------------------------------------------------------------- @@ -1839,22 +1840,14 @@ static void wxCanvasRepaintProc(Widget drawingArea, { case Expose: { + win->AddUpdateRect(event->xexpose.x, event->xexpose.y, + event->xexpose.width, event->xexpose.height); + if (event -> xexpose.count == 0) { -#if 0 - wxPaintEvent event(win->GetId()); - event.SetEventObject(win); - win->GetEventHandler()->ProcessEvent(event); -#endif // 0 - win->DoPaint(); win->ClearUpdateRects(); } - else - { - win->AddUpdateRect(event->xexpose.x, event->xexpose.y, - event->xexpose.width, event->xexpose.height); - } break; } }