From b8a31222b97c4ac4f61463ecccdfb4137916faa0 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Tue, 13 May 2003 19:58:53 +0000 Subject: [PATCH] Fixed bug with notebook pages not showing (probably affected any wxWindow/wxPanel child when panel was hidden and then shown again). The bug was introduced by the fix for hidden windows still intercepting mouse events. (backport) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/window.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 88d11a20ac..e880d8ae24 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -178,17 +178,6 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool map) if ( !w ) 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. @@ -196,6 +185,17 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool map) // or that most controls are shown every time they are moved or resized! XtSetMappedWhenManaged( w, map ); + if ( map ) + { + XtManageChild(w); + // XtMapWidget(w); + } + else + { + // XtUnmapWidget(w); + XtUnmanageChild(w); + } + return TRUE; } @@ -694,7 +694,7 @@ bool wxWindow::Show(bool show) if (m_borderWidget || m_scrolledWindow) { - MapOrUnmap(m_drawingArea, show); + // MapOrUnmap(m_drawingArea, show); MapOrUnmap(m_borderWidget ? m_borderWidget : m_scrolledWindow, show); } else