X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4871d34290873072ca2783074d4779ba5ecb2052..9534d0dfdc3c6fad8ea5d5fd31bbb6f20650929b:/src/motif/window.cpp diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 3063917e61..d219483039 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -629,7 +629,8 @@ void wxWindow::Lower() void wxWindow::SetLabel(const wxString& label) { - XtVaSetValues((Widget)GetMainWidget(), XmNtitle, label.mb_str(), NULL); + XtVaSetValues((Widget)GetMainWidget(), XmNtitle, + (const char*)label.mb_str(), NULL); } wxString wxWindow::GetLabel() const @@ -1171,7 +1172,7 @@ void wxWindow::DoGetSize(int *x, int *y) const XmNwidth, &xx, XmNheight, &yy, NULL ); - if(x) *x = widget ? xx : -1; + if(x) *x = widget ? xx : -1; if(y) *y = widget ? yy : -1; } @@ -1653,7 +1654,7 @@ void wxWindow::OnInternalIdle() { // This calls the UI-update mechanism (querying windows for // menu/toolbar/control state information) - if (wxUpdateUIEvent::CanUpdate(this)) + if (wxUpdateUIEvent::CanUpdate(this) && IsShown()) UpdateWindowUI(wxUPDATE_UI_FROMIDLE); } @@ -2623,14 +2624,14 @@ void wxGetTextExtent(const wxWindow* window, const wxString& str, { XRectangle ink, logical; WXFontSet fset = (WXFontSet) args[0].value; - + XmbTextExtents( (XFontSet)fset, str.c_str(), str.length(), &ink, &logical); if( width ) *width = logical.width; if( height ) *height = logical.height; - if( ascent ) *ascent = -logical.y; - if( descent ) *descent = logical.height + logical.y; + if( ascent ) *ascent = -logical.y; + if( descent ) *descent = logical.height + logical.y; } else { @@ -2669,14 +2670,14 @@ void wxGetTextExtent(const wxWindow* window, const wxString& str, if (type == XmFONT_IS_FONTSET) { XRectangle ink, logical; - + XmbTextExtents( (XFontSet)thing, str.c_str(), str.length(), &ink, &logical); if( width ) *width = logical.width; if( height ) *height = logical.height; - if( ascent ) *ascent = -logical.y; - if( descent ) *descent = logical.height + logical.y; + if( ascent ) *ascent = -logical.y; + if( descent ) *descent = logical.height + logical.y; } else {