Commit c2ee77b
committed
Issue #247 - [GTK][Wayland] Drag&drop gets stuck
The problem was introduced in patch for Bug 541635, which accidentally
ignored calculated `dragging` variable, causing drag to begin
immediately when mouse is moved.
Also, it introduced a crazy loop, which, if it proceeds to second
iteration, will loop forever, because GTK events can't be processed when
main thread is busy running the infinite loop. Luckily, it seems that
the loop always exited on first iteration, and its meaning was simply to
`return false` when mouse is not down.
The reason why drag&drop can become stuck is not exactly clear, but I'm
confident that it was related to very short drag&drop mouse move
threshold (basically, 1px). With the regular threshold, the bug may
still be present, but it's almost impossible to reproduce.
The real case behind this bug is that when actual human double-clicks a
TreeItem, sometimes mouse will be moved very slightly when doing so,
which started a drag&drop, which got stuck and caused further problems
in applications which were puzzled by never ending drag&drop. Also, it
results in `TreeDragSourceEffect` image leak, because it never receives
the drag end event.1 parent 9ac10ff commit c2ee77b
File tree
2 files changed
+91
-27
lines changed- bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets
- tests/org.eclipse.swt.tests/ManualTests/org/eclipse/swt/tests/manual
2 files changed
+91
-27
lines changedLines changed: 17 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
| |||
2671 | 2670 | | |
2672 | 2671 | | |
2673 | 2672 | | |
2674 | | - | |
2675 | 2673 | | |
2676 | 2674 | | |
2677 | 2675 | | |
2678 | 2676 | | |
2679 | 2677 | | |
2680 | 2678 | | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
2681 | 2686 | | |
2682 | 2687 | | |
2683 | 2688 | | |
2684 | 2689 | | |
2685 | | - | |
2686 | | - | |
2687 | | - | |
2688 | | - | |
2689 | | - | |
2690 | | - | |
2691 | | - | |
| 2690 | + | |
2692 | 2691 | | |
2693 | 2692 | | |
2694 | | - | |
2695 | | - | |
2696 | | - | |
2697 | | - | |
2698 | | - | |
2699 | | - | |
2700 | | - | |
2701 | | - | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
2702 | 2698 | | |
| 2699 | + | |
| 2700 | + | |
2703 | 2701 | | |
| 2702 | + | |
2704 | 2703 | | |
2705 | 2704 | | |
2706 | 2705 | | |
| |||
2801 | 2800 | | |
2802 | 2801 | | |
2803 | 2802 | | |
| 2803 | + | |
2804 | 2804 | | |
2805 | | - | |
2806 | 2805 | | |
2807 | 2806 | | |
2808 | 2807 | | |
| |||
3429 | 3428 | | |
3430 | 3429 | | |
3431 | 3430 | | |
3432 | | - | |
3433 | 3431 | | |
3434 | 3432 | | |
3435 | 3433 | | |
| |||
3473 | 3471 | | |
3474 | 3472 | | |
3475 | 3473 | | |
3476 | | - | |
3477 | 3474 | | |
3478 | 3475 | | |
3479 | 3476 | | |
| |||
4097 | 4094 | | |
4098 | 4095 | | |
4099 | 4096 | | |
4100 | | - | |
4101 | | - | |
4102 | | - | |
4103 | | - | |
4104 | 4097 | | |
4105 | 4098 | | |
4106 | 4099 | | |
| |||
4131 | 4124 | | |
4132 | 4125 | | |
4133 | 4126 | | |
4134 | | - | |
4135 | | - | |
4136 | | - | |
4137 | 4127 | | |
4138 | 4128 | | |
4139 | 4129 | | |
| |||
Lines changed: 74 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
0 commit comments