JAL-3130 Lots of deprecation fixes. See utils/deprecation_auto_fixes.sh for commands...
[jalview.git] / src / jalview / appletgui / SeqPanel.java
index e07dae6..fee68c8 100644 (file)
@@ -499,8 +499,8 @@ public class SeqPanel extends Panel implements MouseMotionListener,
 
     // For now, ignore the mouseWheel font resizing on Macs
     // As the Button2_mask always seems to be true
-    if ((evt.getModifiers()
-            & InputEvent.BUTTON2_MASK) == InputEvent.BUTTON2_MASK
+    if ((evt.getModifiersEx()
+            & InputEvent.BUTTON2_DOWN_MASK) == InputEvent.BUTTON2_DOWN_MASK
             && !av.MAC)
     {
       mouseWheelPressed = true;
@@ -1432,8 +1432,8 @@ public class SeqPanel extends Panel implements MouseMotionListener,
     }
 
     // DETECT RIGHT MOUSE BUTTON IN AWT
-    if ((evt.getModifiers()
-            & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+    if ((evt.getModifiersEx()
+            & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
     {
       List<SequenceFeature> allFeatures = findFeaturesAtColumn(sequence,
               sequence.findPosition(column + 1));