-
Notifications
You must be signed in to change notification settings - Fork 488
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
8251240: Menus inaccessible on Linux with i3 wm #1173
Conversation
👋 Welcome back tsayao! A progress list of the required criteria for merging this PR into |
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.
Looks good to me!
Tested on Ubuntu and Ubuntu with i3 window manager.
Passes on the latter after this patch, and fails before it.
@tsayao 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 44 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 |
if (frame_type == TITLED) { | ||
GdkRectangle rect; | ||
gdk_window_get_frame_extents(gdk_window, &rect); |
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.
Looking at potential regression: in case of a TITLED frame, before this patch you would use get_frame_extents
and now you will use get_origin
in all cases. Are there scenario's where this might lead to regression, or is there a way to test this?
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.
geometry.x
and y
should point to the top left corner of the window including decorations (on JavaFX logic), then the view position will have the decoration size as x and y. gdk_window_get_frame_extents
returns the top left position with frame extents (decorations) - all other Gdk/Gtk functions will return position without decorations (because on X11 they are drawn on client side). Somehow gdk_window_get_frame_extents
is broken on i3-wm, but we already have the frame extents values. I just replaced it by getting normal origins (does not include decorations) and if the frame is TITLED, subtract the frame extents to have the window position accounting decorations.
To test this I:
- Run the bug example with UNDECORATED window on i3 and mutter (the default gnome wm);
- Run the bug example with DECORATED window on i3 and mutter (the default gnome wm);
/reviewers 2 |
@tsayao This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Can someone sponsor this? |
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.
I am very careful when generic glass code is changed, but with the explanation added, I don't see a potential case for regression, so +1 from me.
We should encourage developers to use 22-ea builds to make sure there is indeed no regression.
@tsayao This is ready to integrate when you are ready. |
/integrate |
Going to push as commit f185974.
Your commit was automatically rebased without conflicts. |
The bug happens because
gdk_window_get_frame_extents
is not returning the correct position when o i3-wm, probably by some bug on the wm itself.Te fix replaces the usage of the function for already known extents value calculation.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1173/head:pull/1173
$ git checkout pull/1173
Update a local copy of the PR:
$ git checkout pull/1173
$ git pull https://git.openjdk.org/jfx.git pull/1173/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1173
View PR using the GUI difftool:
$ git pr show -t 1173
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1173.diff
Webrev
Link to Webrev Comment