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 committed Jul 29, 2024
1 parent 4e595b1 commit db76a86
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 db76a86

Please sign in to comment.