diff options
author | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-31 16:37:03 +0000 |
---|---|---|
committer | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-31 16:37:03 +0000 |
commit | c4d6bce56755d7d200de626376bcf4308d5a56a2 (patch) | |
tree | 99c39a620387739ab841c3bc91ee4c502b62a50a /trunk/pdf-over-gui/src/main | |
parent | 9a6f1e68edac1688353ab1e073bb782df76d3600 (diff) | |
download | pdf-over-c4d6bce56755d7d200de626376bcf4308d5a56a2.tar.gz pdf-over-c4d6bce56755d7d200de626376bcf4308d5a56a2.tar.bz2 pdf-over-c4d6bce56755d7d200de626376bcf4308d5a56a2.zip |
Windows scrollbar fix
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12765 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src/main')
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java index c8d725c3..e9bc275a 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java @@ -122,8 +122,10 @@ public class PositioningComposite extends StateComposite { this.frame = SWT_AWT.new_Frame(this.mainArea); this.mainArea.addKeyListener(this.keyListener); - this.frame.addMouseWheelListener(this.mouseListener); this.scrollbar.addSelectionListener(this.selectionListener); + // Workaround for Windows: Scrollbar always gets the event + if (!System.getProperty("os.name").toLowerCase().contains("windows")) //$NON-NLS-1$ //$NON-NLS-2$ + this.frame.addMouseWheelListener(this.mouseListener); requestFocus(); } @@ -241,10 +243,6 @@ public class PositioningComposite extends StateComposite { @Override public void mouseWheelMoved(MouseWheelEvent e) { - // Workaround for Windows: Scrollbar always gets the event - if (System.getProperty("os.name").toLowerCase().contains("windows")) //$NON-NLS-1$ //$NON-NLS-2$ - return; - // Workaround for Linux: Events fire twice if (e.getWhen() == this.lastEventTime) return; |