Commit fdfe5fb
committed
[GTK] Anchor Wayland display coordinates to the monitor of the window
Wayland never tells a client where its window is, so gdk_window_get_origin
returns window relative values while Monitor geometry is global. Code that
clips a location against a monitor then mixes two coordinate spaces.
The JFace information controls do exactly that. With a monitor layout whose
client areas do not start near y=0, every anchor is rejected: hovers come up
empty and the content assist javadoc popup lands on a different monitor.
Wayland does report which monitor a surface is on. Anchor display coordinates
to that origin, and remove it again when positioning a window or a menu.
Display.getCursorLocation() gets the same treatment, since callers compare it
against Control.toDisplay().
The window's position within its monitor is still unknown. Popups are placed
relative to their parent and unaffected by that remaining error.
X11 and GTK4 are unchanged.
Fixes #35391 parent b8cded7 commit fdfe5fb
4 files changed
Lines changed: 69 additions & 9 deletions
File tree
- bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets
Lines changed: 36 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1691 | 1691 | | |
1692 | 1692 | | |
1693 | 1693 | | |
1694 | | - | |
1695 | | - | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
1696 | 1697 | | |
1697 | 1698 | | |
1698 | 1699 | | |
| |||
1756 | 1757 | | |
1757 | 1758 | | |
1758 | 1759 | | |
1759 | | - | |
1760 | | - | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
1761 | 1763 | | |
1762 | 1764 | | |
1763 | 1765 | | |
| |||
6919 | 6921 | | |
6920 | 6922 | | |
6921 | 6923 | | |
| 6924 | + | |
| 6925 | + | |
| 6926 | + | |
| 6927 | + | |
| 6928 | + | |
| 6929 | + | |
6922 | 6930 | | |
6923 | 6931 | | |
6924 | 6932 | | |
| 6933 | + | |
| 6934 | + | |
| 6935 | + | |
| 6936 | + | |
| 6937 | + | |
| 6938 | + | |
| 6939 | + | |
| 6940 | + | |
| 6941 | + | |
| 6942 | + | |
| 6943 | + | |
| 6944 | + | |
| 6945 | + | |
| 6946 | + | |
| 6947 | + | |
| 6948 | + | |
| 6949 | + | |
| 6950 | + | |
| 6951 | + | |
| 6952 | + | |
| 6953 | + | |
| 6954 | + | |
| 6955 | + | |
| 6956 | + | |
6925 | 6957 | | |
6926 | 6958 | | |
6927 | 6959 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2045 | 2045 | | |
2046 | 2046 | | |
2047 | 2047 | | |
| 2048 | + | |
| 2049 | + | |
2048 | 2050 | | |
2049 | 2051 | | |
2050 | 2052 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
451 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
452 | 456 | | |
453 | 457 | | |
454 | 458 | | |
| |||
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
| 1351 | + | |
1351 | 1352 | | |
1352 | 1353 | | |
1353 | 1354 | | |
1354 | 1355 | | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1355 | 1371 | | |
1356 | 1372 | | |
1357 | 1373 | | |
| |||
1601 | 1617 | | |
1602 | 1618 | | |
1603 | 1619 | | |
| 1620 | + | |
1604 | 1621 | | |
1605 | 1622 | | |
1606 | 1623 | | |
| |||
2417 | 2434 | | |
2418 | 2435 | | |
2419 | 2436 | | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
2420 | 2441 | | |
2421 | 2442 | | |
2422 | | - | |
| 2443 | + | |
2423 | 2444 | | |
2424 | 2445 | | |
2425 | 2446 | | |
| |||
2431 | 2452 | | |
2432 | 2453 | | |
2433 | 2454 | | |
2434 | | - | |
| 2455 | + | |
2435 | 2456 | | |
2436 | 2457 | | |
2437 | 2458 | | |
2438 | | - | |
| 2459 | + | |
2439 | 2460 | | |
2440 | 2461 | | |
2441 | 2462 | | |
| |||
3613 | 3634 | | |
3614 | 3635 | | |
3615 | 3636 | | |
| 3637 | + | |
3616 | 3638 | | |
3617 | 3639 | | |
3618 | 3640 | | |
| |||
0 commit comments