Bug 515396 - [Wayland] dragDetect should block till DnD state is known
Summary: [Wayland] dragDetect should block till DnD state is known
Status: CLOSED DUPLICATE of bug 541635
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P4 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 79925 swtWaylandImproveDnD
  Show dependency tree
 
Reported: 2017-04-18 15:17 EDT by Leo Ufimtsev CLA
Modified: 2018-12-13 13:43 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Ufimtsev CLA 2017-04-18 15:17:17 EDT
Originally for Gtk2/Gtk3, dragDetect() method blocked until drag was detected or mouse was released.

For DnD on Wayland, we made dragDetect() non-blocking and all drag logic was moved into gtk_motion_notify_event(..).

While this enabled DnD on Wayland, it caused a series of regressions:
- Bug 514419 - [regression][GTK3] DND is broken in staging view
- Bug 514659 - [regression] Double-click and drag doesn't work in java editor
- Bug 514531 - [GTK3][regression] Launch config is not opened after creation
- Double click & then clicking on keyword moved cursor to top of screen
- Tree selection issues (?)
- etc... there may be more that we haven't seen.

After investigation, we found that common/external widgets (for example styledText) as well as a lot of internal widgets heavily rely on dragDetect() having blocking behaviour. 
This blocking behaviour is what Win32/Cocoa does as well.

As such, I suggest to implement blocking behaviour in dragDetect(..), (while still utilizing gtk_motion_*_even() for actual drag detection.

I'll submit proof-of-concept patch shortly.
Comment 1 Eclipse Genie CLA 2017-04-18 15:21:30 EDT
New Gerrit change created: https://git.eclipse.org/r/95207
Comment 2 Leo Ufimtsev CLA 2018-02-01 15:43:54 EST
This change is too risky at this stage in 4.8. Need to wait till after release.
Comment 3 Alexander Kurtakov CLA 2018-04-17 02:35:33 EDT
(In reply to Leo Ufimtsev from comment #2)
> This change is too risky at this stage in 4.8. Need to wait till after
> release.

Why wait? Every next release will be in 3 months, so it's not like from now on we will have more time than now.
Comment 4 Leo Ufimtsev CLA 2018-04-17 15:25:36 EDT
(In reply to Alexander Kurtakov from comment #3)
> (In reply to Leo Ufimtsev from comment #2)
> > This change is too risky at this stage in 4.8. Need to wait till after
> > release.
> 
> Why wait? Every next release will be in 3 months, so it's not like from now
> on we will have more time than now.

That's a good point.
Comment 5 Eric Williams CLA 2018-12-13 13:43:42 EST

*** This bug has been marked as a duplicate of bug 541635 ***