Author: jackson
Date: 2007-05-28 11:17:09 -0400 (Mon, 28 May 2007)
New Revision: 78066
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Dnd.cs
Log:
* X11Dnd.cs: Add a timer, so after drop, if a finish is not
recieved, we will exit the dnd tracking loop.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-28 15:08:22 UTC (rev 78065)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-28 15:17:09 UTC (rev 78066)
@@ -1,5 +1,10 @@
2007-05-28 Jackson Harper <[EMAIL PROTECTED]>
+ * X11Dnd.cs: Add a timer, so after drop, if a finish is not
+ recieved, we will exit the dnd tracking loop.
+
+2007-05-28 Jackson Harper <[EMAIL PROTECTED]>
+
* X11Dnd.cs: Keep tracking until the xdnd finished event is
recieved. TODO: I should probably stick a timer on the dropped
event, and finish the drag if the XDND Finished event never shows
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Dnd.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Dnd.cs
2007-05-28 15:08:22 UTC (rev 78065)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Dnd.cs
2007-05-28 15:17:09 UTC (rev 78066)
@@ -344,6 +344,7 @@
//private IntPtr CurrentCursorHandle;
private bool tracking = false;
+ private bool dropped = false;
private X11Keyboard keyboard;
public X11Dnd (IntPtr display, X11Keyboard keyboard)
@@ -462,6 +463,16 @@
private void DndTickHandler (object sender, EventArgs e)
{
+ // This is to make sure we don't get stuck in a loop if
another
+ // app doesn't finish the DND operation
+ if (dropped) {
+ Timer t = (Timer) sender;
+ if (t.Interval == 500)
+ tracking = false;
+ else
+ t.Interval = 500;
+ }
+
HandleMouseOver ();
}
@@ -1006,6 +1017,7 @@
xevent.ClientMessageEvent.ptr3 = time;
XplatUIX11.XSendEvent (display, handle, false,
IntPtr.Zero, ref xevent);
+ dropped = true;
}
private void SendPosition (IntPtr handle, IntPtr from, IntPtr
action, int x, int y, IntPtr time)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches