LessTif 0.93 does not hang in wxWindow::ChangeFont as 0.87 did:
enable chainging window font again. Set/reset MappedWhenManaged flag when showing/hiding a window, otherwise, since some common operations (moving, adding items to a listbox, ...) do a Unmanage-Manage pair, calling Hide and then (for example) SetSize would show the window again. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -172,17 +172,24 @@ void wxWindow::UnmanageAndDestroy(WXWidget widget)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::MapOrUnmap(WXWidget widget, bool map)
|
bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
|
||||||
{
|
{
|
||||||
Widget w = (Widget)widget;
|
Widget w = (Widget)widget;
|
||||||
if ( !w )
|
if ( !w )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if ( map )
|
if ( domap )
|
||||||
XtMapWidget(w);
|
XtMapWidget(w);
|
||||||
else
|
else
|
||||||
XtUnmapWidget(w);
|
XtUnmapWidget(w);
|
||||||
|
|
||||||
|
// Rationale: a lot of common operations (including but not
|
||||||
|
// limited to moving, resizing and appending items to a listbox)
|
||||||
|
// unmamange the widget, do their work, then manage it again.
|
||||||
|
// This means that, for example adding an item to a listbox will show it,
|
||||||
|
// or that most controls are shown every time they are moved or resized!
|
||||||
|
XtSetMappedWhenManaged( w, domap );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2986,8 +2993,9 @@ void wxWindow::ChangeFont(bool keepOriginalSize)
|
|||||||
int width, height, width1, height1;
|
int width, height, width1, height1;
|
||||||
GetSize(& width, & height);
|
GetSize(& width, & height);
|
||||||
|
|
||||||
// lesstif 0.87 hangs here
|
// lesstif 0.87 hangs here, but 0.93 does not
|
||||||
#ifndef LESSTIF_VERSION
|
#if !defined(LESSTIF_VERSION) \
|
||||||
|
|| (defined(LesstifVersion) && LesstifVersion >= 93)
|
||||||
XtVaSetValues (w,
|
XtVaSetValues (w,
|
||||||
XmNfontList, (XmFontList) m_font.GetFontList(1.0, XtDisplay(w)),
|
XmNfontList, (XmFontList) m_font.GetFontList(1.0, XtDisplay(w)),
|
||||||
NULL);
|
NULL);
|
||||||
|
Reference in New Issue
Block a user