mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
commit
c8311f15ff
4 changed files with 61 additions and 40 deletions
|
@ -21,9 +21,10 @@ import javax.swing.KeyStroke;
|
|||
|
||||
import docking.ActionContext;
|
||||
import docking.DockingWindowManager;
|
||||
import ghidra.util.Swing;
|
||||
|
||||
/**
|
||||
* An action to trigger a context menu over the focus owner. This allows context menus to be
|
||||
* An action to trigger a context menu over the focus owner. This allows context menus to be
|
||||
* triggered from the keyboard.
|
||||
*/
|
||||
public class ShowContextMenuAction extends DockingAction {
|
||||
|
@ -42,10 +43,12 @@ public class ShowContextMenuAction extends DockingAction {
|
|||
return;
|
||||
}
|
||||
|
||||
// use the focused component to determine what should get the context menu
|
||||
// use the focused component to determine what should get the context menu
|
||||
Component focusOwner = kfm.getFocusOwner();
|
||||
if (focusOwner != null) {
|
||||
DockingWindowManager.showContextMenu(focusOwner);
|
||||
Swing.runLater(() -> {
|
||||
DockingWindowManager.showContextMenu(focusOwner);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue