Repository navigation
Commit a67dc32
[Cocoa] Fix NPE when the press-and-hold accent menu inserts text
Picking an accent from macOS's press-and-hold menu in a Text, Combo or
Spinner with a verify listener failed with a NullPointerException when
the click came more than a moment after the key-up. The menu inserts
the text from the run loop while Display.sleep runs, so
NSApplication.currentEvent() is null, and
shouldChangeTextInRange_replacementString called type() on it.
Treat a missing event like a non-key event, so that verifyText gets
null, as it already does for a mouse event.
Fixes #3819
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 90a9bf5 commit a67dc32
3 files changed
Lines changed: 12 additions & 6 deletions
File tree
- bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1848 | 1848 | | |
1849 | 1849 | | |
1850 | 1850 | | |
1851 | | - | |
1852 | | - | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
1853 | 1855 | | |
1854 | 1856 | | |
1855 | 1857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | | - | |
1036 | | - | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
1037 | 1039 | | |
1038 | 1040 | | |
1039 | 1041 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2372 | 2372 | | |
2373 | 2373 | | |
2374 | 2374 | | |
2375 | | - | |
2376 | | - | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
2377 | 2379 | | |
2378 | 2380 | | |
2379 | 2381 | | |
| |||
0 commit comments