Bug 218823 - [DND] DND, redraw, and event.image
Summary: [DND] DND, redraw, and event.image
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Windows Vista
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact: Kevin Barnes CLA
URL:
Whiteboard: stalebug
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-02-13 12:30 EST by kevin.clark CLA
Modified: 2020-03-12 15:32 EDT (History)
3 users (show)

See Also:


Attachments
Test Case Showing bug (9.94 KB, text/plain)
2008-02-13 12:30 EST, kevin.clark CLA
no flags Details
Modified version of original example so that it can run without ApplicationWindow (8.02 KB, application/octet-stream)
2008-02-13 17:44 EST, Duong Nguyen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description kevin.clark CLA 2008-02-13 12:30:21 EST
Created attachment 89656 [details]
Test Case Showing bug

Hi,

I ran into this issue and was asked to report it as a bug. Here is my original posting (from the newsgroup):

I am having some difficulty with DND, combined with setVisibility on a Label separator and setting an event.image under the drag cursor.

What I'm doing is creating a type of filmstrip. The user can drag images and re-arrange them on the strip. In between each image is a separator that is invisible. The separator becomes visible when the user drags an image over top another image, to show where in the sequence the image would be placed.

All that is fine. What isn't working is that the separators are not being properly redrawn. Occassionally only partial separators are drawn in. Or when the mouse leaves the area, the separator is not being properly cleared (made completely invisible).

It has to do with the fact that I have set an event.image of the image being dragged. If I do not set the image, everything is redrawn as per normal.

I have included a working test case to see the problem for yourself. Try quickly dragging an image between the others, and you'll see what I'm talking about.

Thanks!
Comment 1 kevin.clark CLA 2008-02-13 12:48:47 EST
Duong Nguyen made the following comments on the newsgroup:

It appears that during the drag, a snapshot of the screen behind the the image is taken. In the drag enter, you start to draw lines or to erase some lines. When you leave or move the mouse, the image will try to restore the screen based on the snapshot that it had taken originally. This will either erase lines that you just drew or leave lines that you erased behind.

The only suggestion I can say is to not provide the drag image. Sorry, I can't think of any work around for you.
Comment 2 Duong Nguyen CLA 2008-02-13 17:44:41 EST
Created attachment 89692 [details]
Modified version of original example so that it can run without ApplicationWindow
Comment 3 Peter Severin CLA 2012-11-04 23:48:01 EST
It seems that I stumbled upon a similar bug (Bug 393514) while working with GEF. I encounter repaint issues in drag over listener when the drag event has an image. In my specific case the issue can be reproduced easily by calling Control#update() (after Control#redraw()) method in drag over event. The issue only happens on Windows and seems to be linked to some extra repaint code in DropTarget that is not present on other platforms. Please see Bug 393514 for more details and a SWT test case.
Comment 4 Leo Ufimtsev CLA 2017-08-03 12:30:46 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 5 Eclipse Genie CLA 2020-03-12 15:32:53 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.