]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing visibility checks for native toolbars
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 17 Sep 2005 14:18:50 +0000 (14:18 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 17 Sep 2005 14:18:50 +0000 (14:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toolbar.cpp

index 500226f1ad07f353b571e1cbe945591cfba3a59e..506f9ede00fd081c69e1a70c55c9c457011da43c 100644 (file)
@@ -597,8 +597,9 @@ bool wxToolBar::Show( bool show )
         MacTopLevelHasNativeToolbar( &ownToolbarInstalled );
         if (ownToolbarInstalled)
         {
-            bResult = (HIViewIsVisible( (HIViewRef)m_macHIToolbarRef ) != show);
-            ShowHideWindowToolbar( tlw, show, false );
+            bResult = ( IsWindowToolbarVisible(tlw) != show);
+            if ( bResult )
+                ShowHideWindowToolbar( tlw, show, false );
         }
         else
 #endif
@@ -616,7 +617,10 @@ bool wxToolBar::IsShown() const
     bool ownToolbarInstalled ;
     MacTopLevelHasNativeToolbar( &ownToolbarInstalled );
     if (ownToolbarInstalled)
-        bResult = HIViewIsVisible( (HIViewRef)m_macHIToolbarRef );
+    {
+        WindowRef tlw = MAC_WXHWND(MacGetTopLevelWindowRef());
+        bResult = IsWindowToolbarVisible(tlw) ;
+    }
     else
 #endif
         bResult = wxToolBarBase::IsShown();