]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/splitter.cpp
don't show size grip when maximized
[wxWidgets.git] / src / generic / splitter.cpp
index 6208dfff2f242b90f4062fd4cca08ee49231f94e..d958fa5e1a178c407cfe092bd4db7c59eb42bffe 100644 (file)
@@ -392,20 +392,27 @@ void wxSplitterWindow::OnSize(wxSizeEvent& event)
         parent = parent->GetParent();
     }
 
-    bool iconized;
+    bool iconized = FALSE;
 
+    // wxMotif doesn't yet have a wxTopLevelWindow implementation
+#ifdef __WXMOTIF__
+    wxFrame *winTop = wxDynamicCast(parent, wxFrame);
+#else
     wxTopLevelWindow *winTop = wxDynamicCast(parent, wxTopLevelWindow);
+#endif
     if ( winTop )
     {
         iconized = winTop->IsIconized();
     }
+#ifndef __WXMOTIF__
     else
     {
         wxFAIL_MSG(wxT("should have a top level parent!"));
 
         iconized = FALSE;
     }
-
+#endif
+    
     if ( iconized )
     {
         event.Skip();
@@ -697,7 +704,9 @@ int wxSplitterWindow::AdjustSashPosition(int sashPos) const
 {
     int window_size = GetWindowSize();
 
-    if ( !window_size )
+    // VZ: dirty fix, 20 is the initial window size under wxGTK, this is
+    //     going to be replaced with the correct Vaclav's code soon (FIXME)
+    if ( window_size <= 20 )
     {
         // don't do anything before the window has a valid size, otherwise we
         // put the sash to 0 at the very beginning and it doesn't move from