2007-11-01 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Fri, 2 Nov 2007 01:19:57 +0000 (01:19 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Fri, 2 Nov 2007 01:19:57 +0000 (01:19 -0000)
* X11Dnd.cs: When sending status in a dnd operation, compare current
effect with the 'allowed' field instead of 'drag_data.Allowed', since
the later is only created when a Winforms application is both the
source and the target, but not when we are the target only.
Fixes part of #324251.

svn path=/trunk/mcs/; revision=88705

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Dnd.cs

index 0cac0785dd0a8cb6b1163f60ceb8f4a786bfe1ff..4da97cbe95900b0f6e0d84f7d5be269cbb48c88c 100644 (file)
@@ -1,3 +1,11 @@
+2007-11-01  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * X11Dnd.cs: When sending status in a dnd operation, compare current
+       effect with the 'allowed' field instead of 'drag_data.Allowed', since
+       the later is only created when a Winforms application is both the
+       source and the target, but not when we are the target only.
+       Fixes part of #324251.
+
 2007-11-01  Geoff Norton  <gnorton@novell.com>
 
        * XplatUI*.cs: Add GetPreviousWindow utility method to return windows in
index 8dd3671609414b5271d81182b8bb69cf8f776a29..69ea200a88435511b5dfb8272f883be9fe228372 100644 (file)
@@ -978,7 +978,7 @@ namespace System.Windows.Forms {
                        xevent.ClientMessageEvent.message_type = XdndStatus;
                        xevent.ClientMessageEvent.format = 32;
                        xevent.ClientMessageEvent.ptr1 = toplevel;
-                       if (effect != DragDropEffects.None && (effect & drag_data.AllowedEffects) != 0)
+                       if (effect != DragDropEffects.None && (effect & allowed) != 0)
                                xevent.ClientMessageEvent.ptr2 = (IntPtr) 1;
 
                        xevent.ClientMessageEvent.ptr5 = ActionFromEffect (effect);