summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:11:01 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:11:01 +0000
commit29d1862f4fd178e3885b6998e199f4619c62b2dc (patch)
tree251b42adf1989a5fd20ceb551d504541759f595f /pdf-over-gui/src/main/java/at/asit
parenteaf2eea7ad089539107433f35dfd3bf78c8fc549 (diff)
downloadpdf-over-29d1862f4fd178e3885b6998e199f4619c62b2dc.tar.gz
pdf-over-29d1862f4fd178e3885b6998e199f4619c62b2dc.tar.bz2
pdf-over-29d1862f4fd178e3885b6998e199f4619c62b2dc.zip
Windows scrollbar fix
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@179 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java8
1 files changed, 3 insertions, 5 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 c8d725c3..e9bc275a 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
@@ -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;