it.
* MdiWindowManager.cs: Add IsVisiblePending to track the pending
visibility of mdi child forms. FormSizeChangedHandler: update the
maximized size if size has changed while maximized.
* MdiClient.cs: SizeScrollbars/ArrangeWindows/ActivateChild: Avoid
creating the handle.
* InternalWindowManager.cs: UpdateBorderStyle/FormSizeChangedHandler:
avoid creating the handle if not created.
* XplatUI.cs: Update debug output.
* XplatUIStructs.cs: Added ToString's for a couple of structs.
svn path=/trunk/mcs/; revision=74481
+2007-03-16 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * Menu.cs: MergeMenu: Check menu argument for null before looping over
+ it.
+ * MdiWindowManager.cs: Add IsVisiblePending to track the pending
+ visibility of mdi child forms. FormSizeChangedHandler: update the
+ maximized size if size has changed while maximized.
+ * MdiClient.cs: SizeScrollbars/ArrangeWindows/ActivateChild: Avoid
+ creating the handle.
+ * InternalWindowManager.cs: UpdateBorderStyle/FormSizeChangedHandler:
+ avoid creating the handle if not created.
+ * XplatUI.cs: Update debug output.
+ * XplatUIStructs.cs: Added ToString's for a couple of structs.
+
2007-03-16 Jonathan Pobst <monkey@jpobst.com>
* ContainerControl.cs: Give ToolStripManager the opportunity to handle
public virtual void UpdateBorderStyle (FormBorderStyle border_style)
{
- XplatUI.SetBorderStyle (form.Handle, border_style);
+ if (form.IsHandleCreated) {
+ XplatUI.SetBorderStyle (form.Handle, border_style);
+ }
if (ShouldRemoveWindowManager (border_style)) {
form.RemoveWindowManager ();
private void FormSizeChangedHandler (object sender, EventArgs e)
{
- ThemeEngine.Current.ManagedWindowSetButtonLocations (this);
- XplatUI.InvalidateNC (form.Handle);
+ if (form.IsHandleCreated) {
+ ThemeEngine.Current.ManagedWindowSetButtonLocations (this);
+ XplatUI.InvalidateNC (form.Handle);
+ }
}
protected virtual bool HandleRButtonDown (ref Message m)
{
if (lock_sizing)
return;
+
+ if (!IsHandleCreated)
+ return;
if (Controls.Count == 0 || ((Form) Controls [0]).WindowState == FormWindowState.Maximized) {
if (hbar != null)
private void ArrangeWindows ()
{
+ if (!IsHandleCreated)
+ return;
+
int change = 0;
if (prev_bottom != -1)
change = Bottom - prev_bottom;
SetWindowStates (wm);
if (current != form) {
form.has_focus = false;
- XplatUI.InvalidateNC (current.Handle);
- XplatUI.InvalidateNC (form.Handle);
+ if (current.IsHandleCreated)
+ XplatUI.InvalidateNC (current.Handle);
+ if (form.IsHandleCreated)
+ XplatUI.InvalidateNC (form.Handle);
}
active_child = (Form) Controls [0];
if (mdiclient_layout)
Parent.PerformLayout ();
- //XplatUI.RequestNCRecalc (Parent.Handle);
- //XplatUI.RequestNCRecalc (form.Handle);
+ XplatUI.RequestNCRecalc (Parent.Handle);
+ XplatUI.RequestNCRecalc (form.Handle);
if (!setting_windowstates)
SizeScrollBars ();
}
private bool icon_dont_show_popup;
private TitleButtons maximized_title_buttons;
-
+ private bool is_visible_pending;
+
+ internal bool IsVisiblePending {
+ get {
+ return is_visible_pending;
+ }
+ set {
+ is_visible_pending = value;
+ }
+ }
+
private TitleButtons MaximizedTitleButtons {
get {
if (maximized_title_buttons == null) {
private void FormSizeChangedHandler (object sender, EventArgs e)
{
+ if (form.window_state == FormWindowState.Maximized && form.Bounds != MaximizedBounds)
+ form.Bounds = MaximizedBounds;
+
form.MdiParent.MdiContainer.SizeScrollBars ();
}
if (menuSrc == this)
throw new ArgumentException ("The menu cannot be merged with itself");
+ if (menuSrc == null)
+ return;
+
for (int i = 0; i < menuSrc.MenuItems.Count; i++) {
MenuItem sourceitem = menuSrc.MenuItems[i];
internal static int SendInput (IntPtr hwnd, Queue keys) {
#if DriverDebug
- Console.WriteLine("SendInput({0}): Called", charCode);
+ Console.WriteLine("SendInput({0}, {1}): Called", hwnd, keys);
#endif
return driver.SendInput (hwnd, keys);
}
{
return new Point (x, y);
}
+
+ public override string ToString ()
+ {
+ return "Point {" + x.ToString () + ", " + y.ToString () + ")";
+ }
}
[StructLayout(LayoutKind.Sequential)]
internal uint time;
internal POINT pt;
internal object refobject;
+
+ public override string ToString ()
+ {
+ return String.Format ("msg=0x{0:x} ({1}) hwnd=0x{2:x} wparam=0x{3:x} lparam=0x{4:x} pt=0x{5:x}", (int) message, message.ToString (), hwnd.ToInt32 (), wParam.ToInt32 (), lParam.ToInt32 (), pt);
+ }
}
[Flags]