Skip to content

Commit

Permalink
QueueMenuMouseListener right click menu fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joroto authored and soloturn committed Sep 8, 2024
1 parent 4e595b1 commit aa00c6f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/main/java/com/rarchives/ripme/ui/QueueMenuMouseListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,18 @@ public void actionPerformed(ActionEvent ae) {
updateQueue.accept(queueListModel);
}

@SuppressWarnings("unchecked")
@Override
public void mouseClicked(MouseEvent e) {
public void mousePressed(MouseEvent e) {
checkPopupTrigger(e);
}

@Override
public void mouseReleased(MouseEvent e) {
checkPopupTrigger(e);
}

@SuppressWarnings("unchecked")
private void checkPopupTrigger(MouseEvent e) {
if (e.getModifiersEx() == InputEvent.BUTTON3_DOWN_MASK) {
if (!(e.getSource() instanceof JList)) {
return;
Expand Down

0 comments on commit aa00c6f

Please sign in to comment.