Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Drag and Drop works on WindowsXP but not on Windows7(I have a corner case where drag and drop functionality works find on WindowsXP and also on Linux, but on Window7 and some other versions of Windows, it does not work.)
Drag and Drop works on WindowsXP but not on Windows7 [message #536616] Fri, 28 May 2010 22:21 Go to next message
Andrea Rice is currently offline Andrea RiceFriend
Messages: 3
Registered: July 2009
Junior Member
I have many places where Drag and Drop is being used, in all but one of those cases, drag and drop works perfectly fine. There is once case however where drag and drop works on WindowsXP and also on Linux but does not work on Windows7. The source for the drag is an extension of TreeViewer, the target for the drop is an extension of SourceViewer.

The same TreeViewer source can be used as a drag source when dropping to other locations, which tells me that the drag adapters are properly connected.

The same SourceViewer drop target can be used as a target from other places also which indicates to me that the drop adapter is correctly attached.

The problem transfer type is also the same in all these cases so I don't think that is factor.

In the problem combination, the DropTargetListener never gets called at all, so it is not a problem with the validateDrop or anything like that.

I am wondering if anyone knows of a difference between the various windows platforms that would cause a behaviour change for the drag and drop?
Re: Drag and Drop works on WindowsXP but not on Windows7 [message #537165 is a reply to message #536616] Tue, 01 June 2010 13:36 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
There could be platform differences between XP and Windows 7, but they
should not be exposed, so you are probably seeing a bug in swt. If you see
this problem with a recent build like
http://download.eclipse.org/eclipse/downloads/drops/S-3.6RC3 -201005271700/index.php
then please log a report with swt at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT
and provide a means of reproducing the problem (for example a snippet with
template: http://www.eclipse.org/swt/faq.php#whatisasnippet ).

Thanks!
Grant


"Andrea Rice" <arice@ca.ibm.com> wrote in message
news:htpfl0$lr5$1@build.eclipse.org...
> I have many places where Drag and Drop is being used, in all but one of
those cases, drag and drop works perfectly fine. There is once case however
where drag and drop works on WindowsXP and also on Linux but does not work
on Windows7. The source for the drag is an extension of TreeViewer, the
target for the drop is an extension of SourceViewer.
>
> The same TreeViewer source can be used as a drag source when dropping to
other locations, which tells me that the drag adapters are properly
connected.
>
> The same SourceViewer drop target can be used as a target from other
places also which indicates to me that the drop adapter is correctly
attached.
>
> The problem transfer type is also the same in all these cases so I don't
think that is factor.
>
> In the problem combination, the DropTargetListener never gets called at
all, so it is not a problem with the validateDrop or anything like that.
>
> I am wondering if anyone knows of a difference between the various windows
platforms that would cause a behaviour change for the drag and drop?
Re: Drag and Drop works on WindowsXP but not on Windows7 [message #541215 is a reply to message #537165] Fri, 18 June 2010 17:59 Go to previous messageGo to next message
Andrea Rice is currently offline Andrea RiceFriend
Messages: 3
Registered: July 2009
Junior Member
I have opened SWT bug 317326 to track the issue. Thanks for you help Grant.
Re: Drag and Drop works on WindowsXP but not on Windows7 [message #541632 is a reply to message #536616] Mon, 21 June 2010 20:50 Go to previous message
Andrea Rice is currently offline Andrea RiceFriend
Messages: 3
Registered: July 2009
Junior Member
It turns out that this is a difference in when the focusGained events are sent on various platforms. In Windows XP, it seem that there is acutally a bug where the org.eclipse.swt.widgests.Control does not send a focusGained event when a drag starts. In my case, the mouse comes into the TreeViewer control, and rather than explicitly (mouseDown and mouseUp) selecting something, I just start dragging it (mouseDown only), no focusGained event is sent on Windows XP. However, on Linux, and on Windows 7, the fact that the drag started in the TreeViewer control does cause the focusGained event to be sent. I noticed this difference by examing the difference in Control.sendFocusEvent in both

org.eclipse.swt.gtk.linux_x86_3.4.1.v3453a.jar
and
org.eclipse.swt.win32.w32.x86_3.4.1v3453a.jar

I don't know if this is an SWT bug or a Windows XP bug.
Previous Topic:Open Workspace Resource
Next Topic:making runnable jar with folder structure
Goto Forum:
  


Current Time: Mon Dec 22 13:43:37 GMT 2014

Powered by FUDForum. Page generated in 0.02066 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software