Closed mkartashev closed 5 months ago
Worth creating an automated test case? Or at least a simple reproducer for manual checking, not requiring to launch the IDE?
Worth creating an automated test case? Or at least a simple reproducer for manual checking, not requiring to launch the IDE?
Yes, I attached a manual test to the issue here.
Worth creating an automated test case? Or at least a simple reproducer for manual checking, not requiring to launch the IDE?
Yes, I attached a manual test to the issue here.
I think that a manual jtreg test would be useful here. We have too many reproducers inside the issue without at least a semi-automated way to verify them.
I added a manual test. It can be run on Wayland like so
$ jtreg -testjdk:`pwd`/build/linux-x86_64-server-release/images/jdk -javaoptions:'-Dawt.toolkit.name=WLToolkit' test/jdk/jb/java/awt/Focus/ContextMenuFocusTest.java
JBR-7072 Wayland: clicks on items of floating context menus are ignored
The origin of the problem lies in an unexpected sequence of FocusEvent's generated on the popup invocation. In order to make that sequence more standard, I used the corresponding method from LWComponentPeer as a template. It doesn't cover all Wayland cases yet and falls through to
WLKeyboardFocusManagerPeer.SNFH_FAILURE
case in some instances, but that's a task for another day.Also verified that this fix did not regress on the test from JBR-6145 [Wayland toolkit] Popup windows aren't focusable.