diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-06-03 12:36:29 +0200 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-06-03 12:36:29 +0200 |
commit | 61b9f9a977720516cb510aa4ffc4610c5d492c63 (patch) | |
tree | 695b4487dbe9e439bfc680cbe02a1a341b0f1fc5 /pdf-over-gui | |
parent | cf63d668bf0cd9656c0ecd8a7e4765547027e4da (diff) | |
download | pdf-over-61b9f9a977720516cb510aa4ffc4610c5d492c63.tar.gz pdf-over-61b9f9a977720516cb510aa4ffc4610c5d492c63.tar.bz2 pdf-over-61b9f9a977720516cb510aa4ffc4610c5d492c63.zip |
disable default mousewheel scroll for pdfview, cf. #94
Diffstat (limited to 'pdf-over-gui')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java index 8ca9d3ef..0c2a54b4 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java @@ -145,9 +145,7 @@ public class PositioningComposite extends StateComposite { public void run() { PositioningComposite.this.frame = SWT_AWT.new_Frame(PositioningComposite.this.mainArea); PositioningComposite.this.frame.addKeyListener(PositioningComposite.this.keyListener); - // Workaround for Windows: Scrollbar always gets the event - if (!System.getProperty("os.name").toLowerCase().contains("windows")) //$NON-NLS-1$ //$NON-NLS-2$ - PositioningComposite.this.frame.addMouseWheelListener(PositioningComposite.this.mouseListener); + PositioningComposite.this.frame.addMouseWheelListener(PositioningComposite.this.mouseListener); } }); } @@ -312,6 +310,7 @@ public class PositioningComposite extends StateComposite { @Override public void mouseWheelMoved(MouseWheelEvent e) { + e.consume(); // Workaround for Linux: Events fire twice if (e.getWhen() == this.lastEventTime) return; |