Fix for the fact that unmapped but managed widgets
intercept mouse events even if they are not visible. (backport) 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. (backport) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -179,9 +179,22 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool map)
|
||||
return FALSE;
|
||||
|
||||
if ( map )
|
||||
{
|
||||
XtManageChild(w);
|
||||
XtMapWidget(w);
|
||||
}
|
||||
else
|
||||
{
|
||||
XtUnmapWidget(w);
|
||||
XtUnmanageChild(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, map );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user