Commit 4d96758
committed
[GTK4] Fix context menu not being shown
In GTK3, the menu is shown within gtk_button_press_event() iff the MENU
bit is set. In GTK4, this check has been inverted. Given that this bit
is always set, this means that the menu is never shown.
Additionally, GTK4 needs to be informed that the event has been consumed
by marking the event as claimed, to prevent bubbling. Practically
speaking, this prevents the default menu for GtkEntry's to be shown
together with the SWT menus.1 parent 10cb37c commit 4d96758
File tree
5 files changed
+48
-3
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
+48
-3
lines changedLines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1346 | 1346 | | |
1347 | 1347 | | |
1348 | 1348 | | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
1349 | 1361 | | |
1350 | 1362 | | |
1351 | 1363 | | |
| |||
1358 | 1370 | | |
1359 | 1371 | | |
1360 | 1372 | | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
1361 | 1385 | | |
1362 | 1386 | | |
1363 | 1387 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
117 | 118 | | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
825 | 829 | | |
826 | 830 | | |
827 | 831 | | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
828 | 844 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3416 | 3416 | | |
3417 | 3417 | | |
3418 | 3418 | | |
3419 | | - | |
| 3419 | + | |
3420 | 3420 | | |
3421 | 3421 | | |
3422 | 3422 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
2531 | 2531 | | |
2532 | 2532 | | |
2533 | 2533 | | |
| 2534 | + | |
2534 | 2535 | | |
2535 | 2536 | | |
2536 | 2537 | | |
| |||
2540 | 2541 | | |
2541 | 2542 | | |
2542 | 2543 | | |
| 2544 | + | |
| 2545 | + | |
2543 | 2546 | | |
2544 | 2547 | | |
2545 | 2548 | | |
| |||
0 commit comments