-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
OSX: scrolling only goes down #2
Comments
This is happening on Windows 10 as well, with both scrolling direction configurations. |
I'm also getting this issue on Windows 10 on my Surface Pro 3 trackpad. |
Can confirm with MBP 2018 trackpad, macOS 10.14.1 |
One thing of note is that the scrolling behaves correctly on the symbol tree, program trees, and data type manager. Just the asm and decomp views appear to be misbehaving. |
+1 |
Another thing I found out is if you scroll really fast, it will let you scroll up. Not sure how/why the scroll velocity is a differentiator, but that's a possible workaround. Only tested this on Mac trackpad. |
Can confirm that is a possible "workaround" on Windows 10 as well. |
FIXED! diff --git a/src/Docking/docking/widgets/fieldpanel/FieldPanel.java b/src/Docking/docking/widgets/fieldpanel/FieldPanel.java
index 7194951..4e097fd 100644
--- a/src/Docking/docking/widgets/fieldpanel/FieldPanel.java
+++ b/src/Docking/docking/widgets/fieldpanel/FieldPanel.java
@@ -1420,6 +1420,8 @@ public class FieldPanel extends JPanel
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
int wheelRotation = e.getWheelRotation();
+ if (wheelRotation == 0)
+ return;
int scrollAmount = (wheelRotation < 0) ? -40 : 40;
if (hoverHandler.isHoverShowing()) {
hoverHandler.scroll(scrollAmount); Attached is the fixed Tested and working on macOS 10.14.3, Java 11.0.2. |
Second fixed version that uses floating points, which makes it support flinging/high-speed motions and smooth scroll. Scrolling is now buttery-smooth with my trackpad. Use the other one if this one somehow doesn't work. diff --git a/src/Docking/docking/widgets/fieldpanel/FieldPanel.java b/src/Docking/docking/widgets/fieldpanel/FieldPanel.java
index 7194951..2d72151 100644
--- a/src/Docking/docking/widgets/fieldpanel/FieldPanel.java
+++ b/src/Docking/docking/widgets/fieldpanel/FieldPanel.java
@@ -1419,8 +1419,10 @@ public class FieldPanel extends JPanel
public class BigFieldPanelMouseWheelListener implements MouseWheelListener {
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
- int wheelRotation = e.getWheelRotation();
- int scrollAmount = (wheelRotation < 0) ? -40 : 40;
+ double wheelRotation = e.getPreciseWheelRotation();
+ int scrollAmount = (int)(wheelRotation * 40);
+ if (scrollAmount == 0)
+ return;
if (hoverHandler.isHoverShowing()) {
hoverHandler.scroll(scrollAmount);
} |
Thanks for the fixes; They don't work on my systems for some reason (MacBook Pro 2015 and 2018, latest macOS). Replacing the Docking.jar does not change the behaviour :/ |
Did you restart Ghidra completely after replacing the file? |
@nneonneo how do i build Docking.jar with all the stuff from Docking-src.zip myself? |
@OothecaPickle I didn't build the whole .jar, I just found the file that needed patching and replaced it. Here's my command, assuming the source is in
|
Yes |
@nneonneo your patch works great for me on my MacBook Air on 10.12.6 and i was able to compile with those commands. thanks! :) |
after further testing, it only works some of the time, but still, better than before! |
Interesting that the fix doesn’t work all the time. What sorts of things are you seeing when it doesn’t work, @OothecaPickle? |
@nneonneo if i scroll quickly, scrolling up works fine, but if i scroll slowly it scrolls down. |
Those changes work for me (although I clearly was in a different dir when I built the jar and had to change that a bit), scrolling works perfectly for me now regardless of speed. |
@6661696c are you using a trackpad or magic mouse? |
Trackpad on 2017 MacBook Pro running 10.14.3. |
Thanks for the suggested fix...it will be included in the next release! |
This works nicely - thanks for the fix! Does your sideways scroll work on MacOS? Mine doesn't seem to work properly. |
@jiva Looks like it would take quite a bit of effort to make that work, the layout handler doesn't support horizontal scrolling and the java API being used here doesn't understand that touchpad scrolling exists :/ |
NationalSecurityAgency/ghidra#2 Signed-off-by: Andrii Kurdiumov <kant2002@gmail.com>
* reformat Unix Aout loader * rename UnixAoutRelocation class * rename UnixAoutSymbol class * rework Unix Aout loader
On OSX 10.14.1, when you use the mouse's touch scroll or the touchpad's touch scroll, it will only scroll down regardless of the direction you are scrolling. If mouse scroll direction is set to "Natural" then it's a bit better as upward scrolling works somewhat but it's still buggy because it seems to "resist" the scroll.
The text was updated successfully, but these errors were encountered: