Commit c8e7f2a
committed
[GTK4] Cleanup GtkEventControllerMotion Enter/Leave events
Support for mouse motion events was already implemented with
386bebd. However, following
edge cases were missed:
- Moving the cursor out of the shell and back in doesn't fire a "mouse
enter" event.
Similarly to the way motion events are handled in GTK3, the current
control needs to be cleared on a "leave" event. Otherwise the "enter"
event is suppressed when the cursor is moved out of and back in a shell
again.
- Moving from one widget to another fires two "mouse exit" events.
One event is fired by "gtk4_motion_event()", the other by "leaveProc()".
Only the former should be fired, as it contains the proper "x" and "y"
coordinates.
Latter is fired because "getCursorControl()" always returns "null". This
has been fixed by first calculating the GtkWindow from the GdkSurface
and then selecting the widget at the mouse coordinates. The whole
implementation has also been restructured so that the X11-based
heuristic via the XQueryPointer is only used for GTK3 (because it would
simply return early for GTK4 anyway).
- The tooltip window isn't moved when hovering over different widgets
This is because the tooltip is set for the shell, even though it should
be set for the individual widgets. As a result, only the text is updated
but the window remains where it was initially shown.
Closes #2191 parent 9c0cf66 commit c8e7f2a
File tree
5 files changed
+79
-35
lines changed- bundles/org.eclipse.swt
- Eclipse SWT PI/gtk
- library
- org/eclipse/swt/internal/gtk4
- Eclipse SWT/gtk/org/eclipse/swt/widgets
5 files changed
+79
-35
lines changedLines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1614 | 1614 | | |
1615 | 1615 | | |
1616 | 1616 | | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1617 | 1629 | | |
1618 | 1630 | | |
1619 | 1631 | | |
| |||
2178 | 2190 | | |
2179 | 2191 | | |
2180 | 2192 | | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
2181 | 2205 | | |
2182 | 2206 | | |
2183 | 2207 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
133 | 141 | | |
134 | 142 | | |
135 | 143 | | |
| |||
667 | 675 | | |
668 | 676 | | |
669 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
670 | 685 | | |
671 | 686 | | |
672 | 687 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3622 | 3622 | | |
3623 | 3623 | | |
3624 | 3624 | | |
3625 | | - | |
| 3625 | + | |
3626 | 3626 | | |
3627 | 3627 | | |
3628 | 3628 | | |
| |||
4044 | 4044 | | |
4045 | 4045 | | |
4046 | 4046 | | |
| 4047 | + | |
4047 | 4048 | | |
4048 | 4049 | | |
4049 | 4050 | | |
| |||
Lines changed: 36 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1900 | 1900 | | |
1901 | 1901 | | |
1902 | 1902 | | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1903 | 1909 | | |
1904 | 1910 | | |
1905 | | - | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
1909 | | - | |
| 1911 | + | |
1910 | 1912 | | |
1911 | | - | |
1912 | | - | |
1913 | | - | |
1914 | | - | |
1915 | | - | |
1916 | | - | |
1917 | | - | |
1918 | | - | |
1919 | | - | |
1920 | | - | |
1921 | | - | |
1922 | | - | |
1923 | | - | |
1924 | | - | |
1925 | | - | |
1926 | | - | |
1927 | | - | |
1928 | | - | |
1929 | | - | |
1930 | | - | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
1931 | 1924 | | |
1932 | | - | |
1933 | | - | |
1934 | | - | |
1935 | | - | |
1936 | | - | |
1937 | | - | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
1938 | 1940 | | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
1939 | 1944 | | |
1940 | | - | |
1941 | | - | |
1942 | | - | |
1943 | 1945 | | |
1944 | 1946 | | |
1945 | 1947 | | |
| |||
0 commit comments