2006-10-30 Jonathan Pobst <monkey@jpobst.com>
authorJonathan Pobst <monkey@jpobst.com>
Mon, 30 Oct 2006 18:09:07 +0000 (18:09 -0000)
committerJonathan Pobst <monkey@jpobst.com>
Mon, 30 Oct 2006 18:09:07 +0000 (18:09 -0000)
* XplatUI.cs, XplatUIDriver.cs, XplatUIWin32.cs, XplatUIOSX.cs,
  XplatUIX11.cs: Remove old 2 parameter SetVisible.

* Control.cs: Use the new 3 parameter SetVisible with activate = true.

svn path=/trunk/mcs/; revision=67146

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIOSX.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs

index 06be5b05d3b89ff857de363460987496ed96cbef..57a3f197f48267c304dd96569a12dfa838c27247 100644 (file)
@@ -1,3 +1,10 @@
+2006-10-30  Jonathan Pobst  <monkey@jpobst.com>
+
+       * XplatUI.cs, XplatUIDriver.cs, XplatUIWin32.cs, XplatUIOSX.cs,
+         XplatUIX11.cs: Remove old 2 parameter SetVisible.
+
+       * Control.cs: Use the new 3 parameter SetVisible with activate = true.
+
 2006-10-30  Jonathan Pobst  <monkey@jpobst.com>
 
        * XplatUI.cs, XplatUIDriver.cs, XplatUIWin32.cs: Add an overload
index 931c7cdf4e63b94e514e583286585cfc22ba9577..a12ef4cfff0bb75549718b6bc059d4e01ff2badd 100644 (file)
@@ -3335,7 +3335,7 @@ namespace System.Windows.Forms
                                creator_thread = Thread.CurrentThread;
 
                                XplatUI.EnableWindow(window.Handle, is_enabled);
-                               XplatUI.SetVisible(window.Handle, is_visible);
+                               XplatUI.SetVisible(window.Handle, is_visible, true);
 
                                if (clip_region != null) {
                                        XplatUI.SetClipRegion(Handle, clip_region);
@@ -3771,7 +3771,7 @@ namespace System.Windows.Forms
                                is_visible=value;
 
                                if (IsHandleCreated) {
-                                       XplatUI.SetVisible(Handle, value);
+                                       XplatUI.SetVisible(Handle, value, true);
                                        // Explicitly move Toplevel windows to where we want them;
                                        // apparently moving unmapped toplevel windows doesn't work
                                        if (is_visible && (this is Form)) {
index 4d7c628b170f65564996445a444749b463543292..e3d40d3c4146ab69010484eda1eafaf8872a5f46 100644 (file)
@@ -814,13 +814,6 @@ namespace System.Windows.Forms {
                        return driver.SetTopmost(handle, hWndOwner, Enabled);
                }
 
-               internal static bool SetVisible(IntPtr handle, bool visible) {
-                       #if DriverDebug || DriverDebugState
-                               Console.WriteLine("SetVisible({0}, {1}): Called", Window(handle), visible);
-                       #endif
-                       return driver.SetVisible(handle, visible);
-               }
-
                internal static bool SetVisible (IntPtr handle, bool visible, bool activate)
                {
                        #if DriverDebug || DriverDebugState
index b1b41c05178f7b7c399209eedf4084d92622fba9..53508d6747c001bae9de724199b31d6b66894cd7 100644 (file)
@@ -179,7 +179,6 @@ namespace System.Windows.Forms {
 
                internal abstract bool GetText(IntPtr handle, out string text);
                internal abstract bool Text(IntPtr handle, string text);
-               internal abstract bool SetVisible(IntPtr handle, bool visible);
                internal abstract bool SetVisible(IntPtr handle, bool visible, bool activate);
                internal abstract bool IsVisible(IntPtr handle);
                internal abstract bool IsEnabled(IntPtr handle);
index f1d40ace189c1e1e8d8f56a1130909be5b1c2236..76ff08a8c6baa1ba0ff046933a850de05858a795 100644 (file)
@@ -1584,7 +1584,7 @@ namespace System.Windows.Forms {
                }
                
                
-               internal override bool SetVisible(IntPtr handle, bool visible) {
+               internal override bool SetVisible(IntPtr handle, bool visible, bool activate) {
                        Hwnd hwnd = Hwnd.ObjectFromHandle (handle);
                        object window = WindowMapping [hwnd.Handle];
                        if (window != null)
@@ -1598,11 +1598,6 @@ namespace System.Windows.Forms {
                        hwnd.visible = visible;
                        return true;
                }
-
-               internal override bool SetVisible (IntPtr handle, bool visible, bool activate)
-               {
-                       return SetVisible (handle, visible);
-               }
                
                internal override void SetBorderStyle(IntPtr handle, FormBorderStyle border_style) {
                        Hwnd    hwnd;
index 88037e9b2a712ca6e3bfaa914415b716e1907f3e..acea9d3c944f323a03dba6384048bb1c0f575cf0 100644 (file)
@@ -1542,26 +1542,6 @@ namespace System.Windows.Forms {
                        return true;
                }
 
-               internal override bool SetVisible(IntPtr handle, bool visible) {
-                       if (visible) {
-                               if (Control.FromHandle(handle) is Form) {
-                                       Form f;
-
-                                       f = (Form)Control.FromHandle(handle);
-                                       switch (f.WindowState) {
-                                               case FormWindowState.Normal:    Win32ShowWindow(handle, WindowPlacementFlags.SW_SHOWNORMAL); break;
-                                               case FormWindowState.Minimized: Win32ShowWindow(handle, WindowPlacementFlags.SW_MINIMIZE); break;
-                                               case FormWindowState.Maximized: Win32ShowWindow(handle, WindowPlacementFlags.SW_MAXIMIZE); break;
-                                       }
-                               } else {
-                                       Win32ShowWindow(handle, WindowPlacementFlags.SW_SHOWNORMAL);
-                               }
-                       } else {
-                               Win32ShowWindow(handle, WindowPlacementFlags.SW_HIDE);
-                       }
-                       return true;
-               }
-
                internal override bool SetVisible (IntPtr handle, bool visible, bool activate)
                {
                        if (visible) {
@@ -1610,7 +1590,7 @@ namespace System.Windows.Forms {
                                }
                        }
                        else
-                               SetVisible (handle, c.Visible);
+                               SetVisible (handle, c.Visible, true);
                                
                        return Win32SetParent(handle, parent);
                }
index 38839ae5113a2a0dbb9de289260040cfd3a15428..9f15520a853bd90df2631a6848d82fc7b35d59ed 100644 (file)
@@ -4529,7 +4529,7 @@ namespace System.Windows.Forms {
                        return true;
                }
 
-               internal override bool SetVisible(IntPtr handle, bool visible) {
+               internal override bool SetVisible(IntPtr handle, bool visible, bool activate) {
                        Hwnd    hwnd;
 
                        hwnd = Hwnd.ObjectFromHandle(handle);
@@ -4560,11 +4560,6 @@ namespace System.Windows.Forms {
                        return true;
                }
 
-               internal override bool SetVisible (IntPtr handle, bool visible, bool activate)
-               {
-                       return SetVisible (handle, visible);
-               }
-
                internal override void SetWindowMinMax(IntPtr handle, Rectangle maximized, Size min, Size max) {
                        Hwnd            hwnd;
                        XSizeHints      hints;