Author: everaldo
Date: 2007-02-23 10:50:50 -0500 (Fri, 23 Feb 2007)
New Revision: 73370
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MainMenu.cs
Log:
2007-02-23 Everaldo Canuto <[EMAIL PROTECTED]>
* MainMenu.cs: Change Draw method to take care about MenuOrigin to be
compatible with non X11 systems. Fixes #80901.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-02-23 15:33:18 UTC (rev 73369)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-02-23 15:50:50 UTC (rev 73370)
@@ -1,3 +1,8 @@
+2007-02-23 Everaldo Canuto <[EMAIL PROTECTED]>
+
+ * MainMenu.cs: Change Draw method to take care about MenuOrigin to be
+ compatible with non X11 systems. Fixes #80901.
+
2007-02-23 Gert Driesen <[EMAIL PROTECTED]>
* ListView.cs: Added bool argument to UpdateMultiSelection to specify
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MainMenu.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MainMenu.cs
2007-02-23 15:33:18 UTC (rev 73369)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MainMenu.cs
2007-02-23 15:50:50 UTC (rev 73370)
@@ -99,18 +99,20 @@
#region Private Methods
- internal void Draw () {
+ internal void Draw ()
+ {
Draw (Rect);
}
- internal void Draw (Rectangle clip_rect) {
- PaintEventArgs pe;
-
+ internal void Draw (Rectangle rect)
+ {
if (Wnd.IsHandleCreated) {
- pe = XplatUI.PaintEventStart(Wnd.window.Handle,
false);
- pe.Graphics.Clip = new Region (clip_rect);
- Draw (pe, Rect);
- XplatUI.PaintEventEnd(Wnd.window.Handle, false);
+ Point pt = XplatUI.GetMenuOrigin
(Wnd.window.Handle);
+
+ PaintEventArgs pevent = XplatUI.PaintEventStart
(Wnd.window.Handle, false);
+ pevent.Graphics.SetClip (new Rectangle (rect.X
+ pt.X, rect.Y + pt.Y, rect.Width, rect.Height));
+ Draw (pevent, Rect);
+ XplatUI.PaintEventEnd (Wnd.window.Handle,
false);
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches