Index: interface.cpp
===================================================================
--- interface.cpp	(revision 12808)
+++ interface.cpp	(working copy)
@@ -331,15 +331,36 @@
     if( ws->GetSettings( WindowSettings::ID_MAIN, b_shown, p, s ) )
         Move( p );

+#if (wxMAJOR_VERSION >= 2) && (wxMINOR_VERSION >= 6) && (wxRELEASE_NUMBER 
 >= 0)
     /* Set minimum window size to prevent user from glitching it */
+    wxSize  s2;
     s = GetSize();
+
+    /* save smallest possible default minimum size */
+    default_size = GetSize();
+
+    /* save slider size for height only for MinSizing */
+    slider_size = slider_sizer->GetSize();
+
+    /* and save extended gui size for MinSize scheme */
+    s2 = extra_frame->GetSize();
+    s2.SetWidth( s2.GetWidth() +
+                2 * wxSystemSettings::GetMetric( wxSYS_FRAMESIZE_X ) );
+    extended_size = s2;
+
+    /* Set initial minimum window size */
     if( config_GetInt( p_intf, "wx-embed" ) )
     {
-        wxSize  s2;
         s2 = video_window->GetSize();
         s.SetHeight( s.GetHeight() - s2.GetHeight() );
     }
+    if( config_GetInt( p_intf, "wx-extended" ) )
+    {
+        s.SetWidth( extended_size.GetWidth() );
+        s.SetHeight( s.GetHeight() + extended_size.GetHeight() );
+    }
     SetMinSize( s );
+#endif

     /* Show extended GUI if requested */
     if( ( b_extra = config_GetInt( p_intf, "wx-extended" ) ) )
@@ -496,22 +517,14 @@
     HDC hdc = GetDC( NULL );
     for( unsigned int i = 0; i < menubar->GetMenuCount(); i++ )
     {
-        //                [ MENU BUTTON WIDTH CALCULATION ]
-        // [ SM_CXDLGFRAME + pixels + textextent + pixels + SM_CXDLGFRAME ]
         GetTextExtentPoint32( hdc, menubar->GetLabelTop(i).c_str(),
                                 menubar->GetLabelTop(i).Length(), &sizing 
);
-        // + text size..
-        i_size += sizing.cx;
-        // +1 more pixel on each size
-        i_size += 2;
-        // width of 2 DLGFRAME
-        i_size += GetSystemMetrics( SM_CXDLGFRAME ) * 2;
+
+        // [ SM_CXDLGFRAME + pixels + textextent + pixels + SM_CXDLGFRAME ]
+        i_size += sizing.cx + 2 + GetSystemMetrics( SM_CXDLGFRAME ) * 2;
     }
     ReleaseDC( NULL, hdc );
-    // Width of 2 edges of app window
-    i_size += GetSystemMetrics( SM_CXSIZEFRAME ) * 2;
-    // + 2 more pixels on each side..
-    i_size += 4;
+    i_size += GetSystemMetrics( SM_CXSIZEFRAME ) * 2 + 4;
#endif
/* End patch by zcot */

@@ -752,11 +765,23 @@

         //prevent continuous layout
         if( slider_frame->IsShown() ) return;
+
+#if (wxMAJOR_VERSION >= 2) && (wxMINOR_VERSION >= 6) && (wxRELEASE_NUMBER 
 >= 0)
+        wxSize ms = GetMinSize();
+        ms.SetHeight( ms.GetHeight() + slider_size.GetHeight() );
+        SetMinSize( ms );
+#endif
     }
     else
     {
         //prevent continuous layout
         if( !slider_frame->IsShown() ) return;
+
+#if (wxMAJOR_VERSION >= 2) && (wxMINOR_VERSION >= 6) && (wxRELEASE_NUMBER 
 >= 0)
+        wxSize ms = GetMinSize();
+        ms.SetHeight( ms.GetHeight() - slider_size.GetHeight() );
+        SetMinSize( ms );
+#endif
     }

     if( layout && p_intf->p_sys->b_video_autosize )
@@ -995,11 +1020,23 @@
     {
         extra_frame->Hide();
         frame_sizer->Hide( extra_frame );
+#if (wxMAJOR_VERSION >= 2) && (wxMINOR_VERSION >= 6) && (wxRELEASE_NUMBER 
 >= 0)
+        wxSize ms = GetMinSize();
+        ms.SetHeight( ms.GetHeight() - extended_size.GetHeight() );
+        ms.SetWidth( default_size.GetWidth() );
+        SetMinSize( ms );
+#endif
     }
     else
     {
         extra_frame->Show();
         frame_sizer->Show( extra_frame );
+#if (wxMAJOR_VERSION >= 2) && (wxMINOR_VERSION >= 6) && (wxRELEASE_NUMBER 
 >= 0)
+        wxSize ms = GetMinSize();
+        ms.SetHeight( ms.GetHeight() + extended_size.GetHeight() );
+        ms.SetWidth( extended_size.GetWidth() );
+        SetMinSize( ms );
+#endif
     }
     frame_sizer->Layout();
     frame_sizer->Fit(this);
Index: wxwidgets.h
===================================================================
--- wxwidgets.h	(revision 12808)
+++ wxwidgets.h	(working copy)
@@ -444,6 +444,11 @@
     wxMenu *p_audio_menu;
     wxMenu *p_video_menu;
     wxMenu *p_navig_menu;
+
+    /* utility dimensions */
+    wxSize default_size;
+    wxSize extended_size;
+    wxSize slider_size;
};

/* Open Dialog */

