From: Mattia Barbon <mbarbon@cpan.org>
Date: Thu, 6 Mar 2003 17:52:41 +0000 (+0000)
Subject:   Work around wxNotebook or Motif or wxMotif bug.
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/10d1f4131db5405eaee6a49d3a96dd0ca4706294

  Work around wxNotebook or Motif or wxMotif bug.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp
index 0f6f0036aa..e64231b122 100644
--- a/src/generic/notebook.cpp
+++ b/src/generic/notebook.cpp
@@ -524,13 +524,20 @@ bool wxNotebook::RefreshLayout(bool force)
         unsigned int nCount = m_pages.Count();
         for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
             wxNotebookPage *pPage = m_pages[nPage];
+            wxRect clientRect = GetAvailableClientSize();
             if (pPage->IsShown())
             {
-                wxRect clientRect = GetAvailableClientSize();
                 pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height);
                 if ( pPage->GetAutoLayout() )
                    pPage->Layout();
             }
+            // MBN: this is probably just hiding a problem under the carpet,
+            // but: with OpenMotif 2.2 (not Lesstif), not moving the window
+            // may cause the tabs to be not clickable.
+            else
+            {
+                pPage->Move(clientRect.x, clientRect.y);
+            }
         }
         Refresh();
     }