-
Notifications
You must be signed in to change notification settings - Fork 493
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
8292922 - [Linux] No more drag events when new Stage is created in drag handler #977
Conversation
Merge master
Merge from jfx
merge from jfx
Merge upstream
Merge from upstream
Update from master
Merge from upstream
Merge with main
Merge master
Merge master
Update from jfx
Pull from origin
Merge master
👋 Welcome back tsayao! A progress list of the required criteria for merging this PR into |
|
Webrevs
|
ddc4c29
to
1fdc328
Compare
/reviewers 2 |
@kevinrushforth |
I had another idea to approach this, will test tonight if time permits. One thing that bugs me is that it's grabbing on click, it probably should grab on drag detection. Let me know it this change would be welcome. |
This seems like a good idea. |
While I cannot meaningfully review this PR, I can attest to the fact that this change fixes JDK-8292922 (and andy-goryachev/FxDock#6) Verified by running FxDock.
It is hard to see any other effects such as flicker (running in a VirtualBox). I ddi not notice any focus-related issues. |
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.
approving. if you want to add sizing changes and/or grab focus on drag start - I'll re-test.
This one deserves a laught. Just commenting the
The rationale is that |
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.
re-tested the same scenarios. somehow it feels there is less flicker than before - it's hard to tell in a virtualized environment.
I did a few tests and it works. |
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.
All my testing looks good, too. Since there is no merge conflict between this and PR #915, I'll leave it up to you if you want to integrate this one first or wait for the other.
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 took a second look at the code that calls grab_mouse_drag_focus
, which was changed to call it on a drag start rather than on a mouse click, and it looks like there is a problem with the way it is now implemented. It will now be called multiple times during a drag operation, instead of just at the start of the drag operation.
modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp
Outdated
Show resolved
Hide resolved
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 now. Thanks.
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.
re-tested with FxDock. beautiful!
@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 7 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit a35c3bf.
Your commit was automatically rebased without conflicts. |
This PR was previously discussed on #905.
The approach is to grab the keyboard focus so the window that originated the drag will keep it.
I did some cleanup on grabbing related functions as well.
gdk_keyboard_focus()
is deprecated, so isgdk_device*
functions in favor ofgdk_seat*
. But that's only available in later Gtk versions. I checked and newer Gtk will usegdk_seat*
inside the deprecatedgdk_keyboard_focus()
.Edit:
The current changes uses another approach that is to not ungrab pointer device when focus is received on another window. There's also some cleanup on grabbing related functions and grab moved from starting on mouse click to the actual drag.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/977/head:pull/977
$ git checkout pull/977
Update a local copy of the PR:
$ git checkout pull/977
$ git pull https://git.openjdk.org/jfx pull/977/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 977
View PR using the GUI difftool:
$ git pr show -t 977
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/977.diff