NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
51.59k stars 5.87k forks source link

Mouse scroll wheel sensitivity fix. #7063

Open teropentis64 opened 3 weeks ago

teropentis64 commented 3 weeks ago

Is your feature request related to a problem? Please describe. Ghidra sensitivity to mouse wheel scroll is way higher than every other app. It may seem a little issue when user is equipped with standard mouse wheel but using Ghidra on touchpad (e.g. in class on a MacBook) may be a little distracting. It's not like it's a bit faster, you really have to be careful with hand gestures not to miss the next jmp branch.

Describe the solution you'd like Just add scroll sensitivity multiplier or if it's easier to implement, try to match the system feeling.

Additional context The issue is existent in macOS since I remember. It's not a bug but implementation. I haven't checked if Windows is the same.

teropentis64 commented 3 weeks ago

Seems it was already reported, issue #6952 . Although the UI is still misbehaving with scroll sensitivity.

ryanmkurtz commented 3 weeks ago

I have a MacBook Pro M1 and I don't experience any sensitivity issues in the Listing. I did have the problem mentioned in #6952 with the Flat themes, but that has been fixed.

So your problem is in the Listing? I fear we might not be able to reproduce that issue.

teropentis64 commented 3 weeks ago

Well, I'm using magic mouse (I know, who uses that...) My scroll sensitivity is at almost lowest setting. I hope this video illustrates it a bit better:

The safari window scroll behaves just like in any other app, while in Ghidra the same scroll movement scrolls listing view by at least two viewport heights.

This is the latest Ghidra right now, just built it from source.

EDIT: It's not theme related, just checked and it occurs in every one of them.

https://github.com/user-attachments/assets/16851f7c-e2c7-4031-8f54-8c45b3edbb4a

ryanmkurtz commented 3 weeks ago

Hmm, i'm also using a magic mouse and don't have that issue.

teropentis64 commented 3 weeks ago

Oh, okay so I should troubleshoot my setup then. I'll get back and post when I find the reason for it.

ryanmkurtz commented 3 weeks ago

The only weirdness i've experienced with my magic mouse in Ghidra is sometimes the double click only responds if I do it at super lightning speed. But then it fixes it self somehow.

teropentis64 commented 3 weeks ago

May I ask which JDK You're using ? I guess the recommended one ?

ryanmkurtz commented 3 weeks ago

JDK 21 from https://adoptium.net/

teropentis64 commented 2 weeks ago

Well sadly I tried various JDKs and no luck. I tried to compile it again with adjusting xxx.getVerticalScrollBar().setUnitIncrement(x) function in Listing java file but that didn't change anything. Also my suspicion is it may be way less prominent when using faster scroll speeds in magic mouse settings.

Ghidra is not the first application to have such problems, as many Java ones have/had it. I've few Java apps on my computer and for now, only Ghidra shows such behaviour.

Upon looking at the https://github.com/NationalSecurityAgency/ghidra/commit/4ab69b08e5d2eb76e1a6c3899852dbdbbac70018 it's more of a workaround than a fix (as stated in the code comment).