]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dialog.cpp
Removed this Maximize() overridden bug
[wxWidgets.git] / src / gtk / dialog.cpp
index a2c3a2bf3e1e7b34a792608157b41a507df9b7e8..6f8cefcb3c812da30a296195b52bcaec8a373760 100644 (file)
@@ -142,9 +142,30 @@ bool wxDialog::Create( wxWindow *parent,
     if (m_parent) m_parent->AddChild( this );
 
     PostCreation();
     if (m_parent) m_parent->AddChild( this );
 
     PostCreation();
-    
+
     gtk_widget_realize( m_widget );
 
     gtk_widget_realize( m_widget );
 
+      long decor = (long) GDK_DECOR_ALL;
+      long func = (long) GDK_FUNC_ALL;
+      
+      if ((m_windowStyle & wxCAPTION) == 0)
+       decor |= GDK_DECOR_TITLE;
+      if ((m_windowStyle & wxMINIMIZE) == 0)
+       func |= GDK_FUNC_MINIMIZE;
+      if ((m_windowStyle & wxMAXIMIZE) == 0)
+       func |= GDK_FUNC_MAXIMIZE;
+      if ((m_windowStyle & wxSYSTEM_MENU) == 0)
+       decor |= GDK_DECOR_MENU;
+      if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
+       decor |= GDK_DECOR_MINIMIZE;
+      if ((m_windowStyle & wxMAXIMIZE_BOX) == 0)
+       decor |= GDK_DECOR_MAXIMIZE;
+      if ((m_windowStyle & wxRESIZE_BORDER) == 0)
+       func |= GDK_FUNC_RESIZE;
+
+      gdk_window_set_decorations(m_widget->window, (GdkWMDecoration)decor);
+      gdk_window_set_functions(m_widget->window, (GdkWMFunction)func);
+      
     gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
         GTK_SIGNAL_FUNC(gtk_dialog_size_callback), (gpointer)this );
 
     gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
         GTK_SIGNAL_FUNC(gtk_dialog_size_callback), (gpointer)this );
 
@@ -337,7 +358,7 @@ void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags )
         if ((m_x != old_x) || (m_y != old_y))
        {
             /* m_sizeSet = FALSE; */
         if ((m_x != old_x) || (m_y != old_y))
        {
             /* m_sizeSet = FALSE; */
-            gtk_widget_set_uposition( m_widget, m_x, m_y ); 
+            gtk_widget_set_uposition( m_widget, m_x, m_y );
        }
     }
 
        }
     }
 
@@ -413,7 +434,7 @@ bool wxDialog::Show( bool show )
     }
 
     wxWindow::Show( show );
     }
 
     wxWindow::Show( show );
-    
+
     if (show) InitDialog();
 
     return TRUE;
     if (show) InitDialog();
 
     return TRUE;
@@ -442,7 +463,7 @@ int wxDialog::ShowModal()
        wxFAIL_MSG( "wxDialog:ShowModal called twice" );
        return GetReturnCode();
     }
        wxFAIL_MSG( "wxDialog:ShowModal called twice" );
        return GetReturnCode();
     }
-    
+
     Show( TRUE );
 
     m_modalShowing = TRUE;
     Show( TRUE );
 
     m_modalShowing = TRUE;