dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnetlib ./ChangeLog System.Windows.Forms/Contro...


From: Heiko Weiss
Subject: [dotgnu-pnet-commits] pnetlib ./ChangeLog System.Windows.Forms/Contro...
Date: Wed, 08 Mar 2006 06:52:06 +0000

CVSROOT:        /sources/dotgnu-pnet
Module name:    pnetlib
Branch:         
Changes by:     Heiko Weiss <address@hidden>    06/03/08 06:52:06

Modified files:
        .              : ChangeLog 
        System.Windows.Forms: Control.cs 

Log message:
        Fixed not processing mouse events, if Control is not enabled.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/ChangeLog.diff?tr1=1.2366&tr2=1.2367&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/System.Windows.Forms/Control.cs.diff?tr1=1.110&tr2=1.111&r1=text&r2=text

Patches:
Index: pnetlib/ChangeLog
diff -u pnetlib/ChangeLog:1.2366 pnetlib/ChangeLog:1.2367
--- pnetlib/ChangeLog:1.2366    Mon Mar  6 12:28:09 2006
+++ pnetlib/ChangeLog   Wed Mar  8 06:52:06 2006
@@ -1,3 +1,6 @@
+2006-03-08  Heiko Weiss  <address@hidden>
+
+       * System.Windows.Forms/Control.cs: Fixed not processing mouse events if 
Control is not enabled.
 
 2006-03-04  Gopal V  <address@hidden>
 
Index: pnetlib/System.Windows.Forms/Control.cs
diff -u pnetlib/System.Windows.Forms/Control.cs:1.110 
pnetlib/System.Windows.Forms/Control.cs:1.111
--- pnetlib/System.Windows.Forms/Control.cs:1.110       Mon Dec  5 11:37:22 2005
+++ pnetlib/System.Windows.Forms/Control.cs     Wed Mar  8 06:52:06 2006
@@ -6068,7 +6068,7 @@
        // Toolkit event that is emitted when the mouse enters this window.
        void IToolkitEventSink.ToolkitMouseEnter()
                        {
-                               if(GetControlFlag(ControlFlags.Enabled))
+                               if(Enabled) // Check Parent Enabled too, not 
just this Control. GetControlFlag(ControlFlags.Enabled))
                                        OnMouseEnter(EventArgs.Empty);
                        }
 
@@ -6077,7 +6077,7 @@
                        {
                                SetControlFlag(ControlFlags.NotifyDoubleClick, 
false);
                                SetControlFlag(ControlFlags.NotifyClick, false);
-                               if(GetControlFlag(ControlFlags.Enabled))
+                               if(Enabled) // Check Parent Enabled too, not 
just this Control. GetControlFlag(ControlFlags.Enabled))
                                        OnMouseLeave(EventArgs.Empty);
                        }
 
@@ -6156,12 +6156,13 @@
                (ToolkitMouseButtons buttons, ToolkitKeys modifiers,
                int clicks, int x, int y, int delta)
                        {
-                               if(!GetControlFlag(ControlFlags.Enabled))
+                               if( !Enabled) //Check if this !Enabled OR 
Parent !Enabled, not just this control.  
//if(!GetControlFlag(ControlFlags.Enabled))
                                {
                                        if (parent != null)
                                                
((IToolkitEventSink)parent).ToolkitMouseDown(buttons, modifiers, clicks, x + 
left, y + top, delta);
                                        return;
                                }
+                               
                                // Convert to client coordinates
                                x += ToolkitDrawOrigin.X - ClientOrigin.X;
                                y += ToolkitDrawOrigin.Y - ClientOrigin.Y;
@@ -6187,7 +6188,7 @@
                                }
 
                                // Walk up the hierarchy and see if we must 
focus the control
-                               if(Enabled)
+                               //if(Enabled) checked above
                                {
                                        OnMouseDown(new MouseEventArgs
                                                (buttons, clicks, x, y, delta));
@@ -6212,7 +6213,7 @@
                (ToolkitMouseButtons buttons, ToolkitKeys modifiers,
                int clicks, int x, int y, int delta)
                        {
-                               if(!GetControlFlag(ControlFlags.Enabled))
+                               if(!Enabled) // Check Parent Enabled too, not 
just this Control. !GetControlFlag(ControlFlags.Enabled))
                                {
                                        if (parent != null)
                                                
((IToolkitEventSink)parent).ToolkitMouseUp(buttons, modifiers, clicks, x + 
left, y + top, delta);
@@ -6248,7 +6249,7 @@
                (ToolkitMouseButtons buttons, ToolkitKeys modifiers,
                int clicks, int x, int y, int delta)
                        {
-                               if(!GetControlFlag(ControlFlags.Enabled))
+                               if(!Enabled) // Check Parent Enabled too, not 
just this Control. !GetControlFlag(ControlFlags.Enabled))
                                {
                                        if (parent != null)
                                                
((IToolkitEventSink)parent).ToolkitMouseHover(buttons, modifiers, clicks, x + 
left, y + top, delta);
@@ -6269,7 +6270,7 @@
                (ToolkitMouseButtons buttons, ToolkitKeys modifiers,
                int clicks, int x, int y, int delta)
                        {
-                               if(!GetControlFlag(ControlFlags.Enabled))
+                               if(!Enabled) //Check Parent Enabled too, not 
just this Control. !GetControlFlag(ControlFlags.Enabled))
                                {
                                        if (parent != null)
                                                
((IToolkitEventSink)parent).ToolkitMouseMove(buttons, modifiers, clicks, x + 
left, y + top, delta);
@@ -6291,6 +6292,11 @@
                (ToolkitMouseButtons buttons, ToolkitKeys modifiers,
                int clicks, int x, int y, int delta)
                        {
+                               if( !Enabled) { // Check Parent Enabled too, 
not just this Control.
+                                       if (parent != null)
+                                               
((IToolkitEventSink)parent).ToolkitMouseWheel(buttons, modifiers, clicks, x + 
left, y + top, delta);
+                                       return;
+                               }
                                // Convert to client coordinates
                                x += ToolkitDrawOrigin.X - ClientOrigin.X;
                                y += ToolkitDrawOrigin.Y - ClientOrigin.Y;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]