From 29d1862f4fd178e3885b6998e199f4619c62b2dc Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:11:01 +0000 Subject: Windows scrollbar fix git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@179 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../java/at/asit/pdfover/gui/composites/PositioningComposite.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'pdf-over-gui/src/main') 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; -- cgit v1.2.3