Author: spouliot
Date: 2006-09-26 14:33:13 -0400 (Tue, 26 Sep 2006)
New Revision: 65930

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2006-09-26  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * XplatUIX11.cs: Fixed SetCursorPos to move the cursor to screen
        coordinates (versus a relative move).



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-09-26 18:24:48 UTC (rev 65929)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-09-26 18:33:13 UTC (rev 65930)
@@ -1,3 +1,8 @@
+2006-09-26  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * XplatUIX11.cs: Fixed SetCursorPos to move the cursor to screen
+       coordinates (versus a relative move).
+
 2006-09-26  Chris Toshok  <[EMAIL PROTECTED]>
 
        * Control.cs: rework child recreation a little bit.  It turns out

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-09-26 18:24:48 UTC (rev 65929)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-09-26 18:33:13 UTC (rev 65930)
@@ -4297,8 +4297,10 @@
 
                internal override void SetCursorPos(IntPtr handle, int x, int 
y) {
                        if (handle == IntPtr.Zero) {
+                               int cx, cy;
+                               GetCursorPos (handle, out cx, out cy);
                                lock (XlibLock) {
-                                       XWarpPointer(DisplayHandle, 
IntPtr.Zero, IntPtr.Zero, 0, 0, 0, 0, x, y);
+                                       XWarpPointer(DisplayHandle, 
IntPtr.Zero, IntPtr.Zero, 0, 0, 0, 0, x - cx, y - cy);
                                }
                                return;
                        } else {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to