Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBR-7072 Wayland: clicks on items of floating context menus are ignored #405

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

mkartashev
Copy link
Collaborator

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.

@mkartashev mkartashev self-assigned this Jun 12, 2024
@JB-Dmitry
Copy link
Contributor

Worth creating an automated test case? Or at least a simple reproducer for manual checking, not requiring to launch the IDE?

@mkartashev
Copy link
Collaborator Author

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.

@avu
Copy link
Collaborator

avu commented Jun 13, 2024

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.

@mkartashev
Copy link
Collaborator Author

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

Copy link
Collaborator

@avu avu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1,125 @@
/*
* Copyright 2024 JetBrains s.r.o.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually we use

  • Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
    as well

@JB-Dmitry JB-Dmitry closed this Jun 14, 2024
@JB-Dmitry JB-Dmitry reopened this Jun 14, 2024
@mkartashev mkartashev merged commit 24f6c0a into jbr21 Jun 14, 2024
@mkartashev mkartashev deleted the mkartash/JBR-7072 branch June 14, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants