RFR: 8280988: [XWayland] Click on title to request focus test failures [v2]

Alexander Zvegintsev azvegint at openjdk.org
Tue Apr 30 02:08:10 UTC 2024


On Tue, 30 Apr 2024 02:02:30 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

>> Some tests try to get the focus of a window by clicking on its title bar.
>> 
>> On XWayland, however, emulating mouse clicks with XTEST currently only affects the XWayland server, not the window decorations, so trying to click on the window title will have no effect.
>> 
>> So the solution is to click inside the window or call `toFront()` to get the window focused.
>> 
>> Some tests have issues with AWT/Swing calls not being on EDT, it is not the goal of this change to fix them as they require way too many code changes, and make this PR hard to review.
>
> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review comments

test/jdk/java/awt/Focus/ModalDialogInFocusEventTest.java line 29:

> 27:   @bug 4531693 4636269 4681908 4688142 4691646 4721470
> 28:   @summary Showing modal dialog during dispatching SequencedEvent
> 29:   @run main ModalDialogInFocusEventTest

This test can be run standalone (`java ...`), so I prefer to keep it that way, so I didn't add the usage of `Platform.isOnWayland`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18995#discussion_r1584032165


More information about the client-libs-dev mailing list