fix(gui): horizontal scrolling in linux#2229
Merged
skylot merged 2 commits intoskylot:masterfrom Jul 31, 2024
Merged
Conversation
skylot
approved these changes
Jul 31, 2024
Owner
|
This looks like a black magic to me 🤣 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had to dig in intellij community source code, as horizontal scrolling works fine there and it also happens to use Java AWT.
I attached jdb debugger to intellij and put a breakpoint on "MouseWheelEvent", simulated horizontal scroll, and it lead me to the code snippets below :
Here's how it's handled in intellij
https://github.com/JetBrains/intellij-community/blob/654dcd7a253d7f527b1d4d6d17be532a40775b1d/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.kt#L1032-L1049
https://github.com/JetBrains/intellij-community/blob/654dcd7a253d7f527b1d4d6d17be532a40775b1d/platform/util/ui/src/com/intellij/util/ui/StartupUiUtil.kt#L184-L189
I copied these three methods in this commit to a custom
JadxEventQueue, should I mention the original sources in the code ?Anyway, horizontal scrolling is now working as expected