-
Notifications
You must be signed in to change notification settings - Fork 522
8357584: [XWayland] [OL10] Robot.mousePress() is delivered to wrong place #1834
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
Conversation
👋 Welcome back azvegint! A progress list of the required criteria for merging this PR into |
@azvegint This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 8 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Reviewers: @kevinrushforth @lukostyra /reviewers 2 |
@kevinrushforth |
@arapte Would you also be able to look into this in case I am not able to? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good on first pass. I've given this quite a bit of testing both on Ubuntu 24.04 (Gnome 46) and Fedora 21 (Gnome 47) and the results are mostly similar. There's a small collection of tests failing on my machine, but that could be for any reason whatsoever. They also fail on master so I suspect it's not the fault of this change.
I see most checks relate to Gnome and its version - what would be the behavior if we ran the tests on a different desktop env like KDE?
This question has already been raised on the OpenJDK PR. The short answer is that it's an unsupported configuration (I am unsure about JFX), so I didn't test it. If some tuning is required to support it, I would prefer to address that as a follow-up fix. Please see quote from openjdk/jdk#25265 (comment) below:
It is not a supported configuration.However, when I tested it a while ago, it only worked in a single-screen scenario for the Screencast. In this case, the Screencast is simply disabled. The Remote Desktop uses the same streams from Screencast portal to control the mouse position. |
} \ | ||
} while (0) | ||
|
||
struct pw_buffer *(*fp_pw_stream_dequeue_buffer)(struct pw_stream *stream); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These PipeWire declarations have been just moved here from the original header. Is this move necessary?
Also (a general thought towards past implementation, not just to your change) I think we should not define those manually at all. There are PipeWire headers defining those that we should include (and I believe we do already include some in screencast_pipewire.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These PipeWire declarations have been just moved here from the original header. Is this move necessary?
It is about clang 17 warning, it was fixed on the jdk side.
I am trying to keep the code similar between OpenJDK and OpenJFX, so I brought this fix here to make maintenance easier.
Also (a general thought towards past implementation, not just to your change) I think we should not define those manually at all. There are PipeWire headers defining those that we should include (and I believe we do already include some in screencast_pipewire.h
The point is basically the same: ease of maintenance between OpenJDK and OpenJFX.
OpenJDK can also be built on very old Linux distributions that lack the necessary headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
Verified that no test fail on ubuntu 24.04. and changes are very similar to that of JDK.
/integrate |
Going to push as commit 639a595.
Your commit was automatically rebased without conflicts. |
This changeset introduces an adapted version of the OpenJDK fix for mouse and keyboard interactions with Robot.
More info about the issue itself is available in the PR description
In short, the currently used XTest for keyboard and mouse interactions may not be suitable for automated testing at some point, as it may require user confirmation to control the mouse or keyboard from time to time.
This fix adds support for the Remote Desktop XDG portal.
This allows us to control the keyboard and mouse with Robot on Wayland, even outside the XWayland server (e.g., clicking on window headers and Wayland native apps).
javafx.robot.screenshotMethod
system property todbusRemoteDesktop
(e.g. it works on Ubuntu 24.04 with GnomeShell 46)Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1834/head:pull/1834
$ git checkout pull/1834
Update a local copy of the PR:
$ git checkout pull/1834
$ git pull https://git.openjdk.org/jfx.git pull/1834/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1834
View PR using the GUI difftool:
$ git pr show -t 1834
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1834.diff
Using Webrev
Link to Webrev Comment