PaintEventArgs pe = XplatUI.PaintEventStart (form.Handle, false);
Rectangle clip;
- if (m.WParam.ToInt32 () > 1) {
- Region r = Region.FromHrgn (m.WParam);
- RectangleF rf = r.GetBounds (pe.Graphics);
- clip = new Rectangle ((int) rf.X, (int) rf.Y, (int) rf.Width, (int) rf.Height);
- } else {
- clip = new Rectangle (0, 0, form.Width, form.Height);
- }
+ // clip region is not correct on win32.
+ // if (m.WParam.ToInt32 () > 1) {
+ // Region r = Region.FromHrgn (m.WParam);
+ // RectangleF rf = r.GetBounds (pe.Graphics);
+ // clip = new Rectangle ((int) rf.X, (int) rf.Y, (int) rf.Width, (int) rf.Height);
+ //} else {
+ clip = new Rectangle (0, 0, form.Width, form.Height);
+ //}
ThemeEngine.Current.DrawManagedWindowDecorations (pe.Graphics, clip, this);
XplatUI.PaintEventEnd (form.Handle, false);
protected virtual void Activate ()
{
// Hack to get a paint
- NativeWindow.WndProc (form.Handle, Msg.WM_NCPAINT, IntPtr.Zero, IntPtr.Zero);
+ //NativeWindow.WndProc (form.Handle, Msg.WM_NCPAINT, IntPtr.Zero, IntPtr.Zero);
form.Refresh ();
}
return true;
}
+
private void FormSizeChangedHandler (object sender, EventArgs e)
{
ThemeEngine.Current.ManagedWindowSetButtonLocations (this);
int y = Control.HighOrder ((int) m.LParam.ToInt32 ());
// Need to adjust because we are in NC land
- NCPointToClient (ref x, ref y);\r
+ NCPointToClient (ref x, ref y);
FormPos pos = FormPosForCoords (x, y);
- Console.WriteLine ("NC POS: {0} for coords: {1}, {2}", pos, x, y);
if (pos == FormPos.TitleBar) {
HandleTitleBarDown (x, y);
form.Capture = false;
state = State.Idle;
+ if (form.MdiContainer != null)
+ form.MdiContainer.SizeScrollBars();
}
int x = Control.LowOrder ((int) m.LParam.ToInt32 ());