Skip to content

Commit

Permalink
Additional fixes to debugger regressions
Browse files Browse the repository at this point in the history
Correctly identify the button being pressed using non-deprecated
functions to fix regression introduced earlier.
  • Loading branch information
gbrail committed Aug 15, 2023
1 parent f173e8c commit da1fcbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
23 changes: 3 additions & 20 deletions toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -2473,25 +2473,7 @@ public boolean isCellEditable(EventObject e) {
// selection remaining the same. To avoid this, we
// only dispatch when the modifiers are 0 (or the left mouse
// button).
if (me.getModifiersEx() == 0
|| ((me.getModifiersEx() & (InputEvent.BUTTON1_DOWN_MASK | 1024)) != 0
&& (me.getModifiersEx()
& (InputEvent.SHIFT_DOWN_MASK
| InputEvent.CTRL_DOWN_MASK
| InputEvent.ALT_DOWN_MASK
| InputEvent.BUTTON2_DOWN_MASK
| InputEvent.BUTTON3_DOWN_MASK
| 64
| // SHIFT_DOWN_MASK
128
| // CTRL_DOWN_MASK
512
| // ALT_DOWN_MASK
2048
| // BUTTON2_DOWN_MASK
4096 // BUTTON3_DOWN_MASK
))
== 0)) {
if (me.getButton() == MouseEvent.BUTTON1 && me.getModifiersEx() == 0) {
int row = rowAtPoint(me.getPoint());
for (int counter = getColumnCount() - 1; counter >= 0; counter--) {
if (TreeTableModel.class == getColumnClass(counter)) {
Expand All @@ -2504,7 +2486,8 @@ public boolean isCellEditable(EventObject e) {
me.getX() - getCellRect(row, counter, true).x,
me.getY(),
me.getClickCount(),
me.isPopupTrigger());
me.isPopupTrigger(),
me.getButton());
MyTreeTable.this.tree.dispatchEvent(newME);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ public boolean isCellEditable(EventObject e) {
me.getX() - getCellRect(0, counter, true).x,
me.getY(),
me.getClickCount(),
me.isPopupTrigger());
me.isPopupTrigger(),
me.getButton());
tree.dispatchEvent(newME);
break;
}
Expand Down

0 comments on commit da1fcbb

Please sign in to comment.