static AutoCloseable tempGlobalPopupMenu(IVF2 fillMenu, double delay default 0.1) { ret fillMenu == null ?: tempAddPopupButtonListener(evt -> { awtLater(delay, r { var menu = currentPopupMenu(); var c = evt.getComponent(); var c2 = SwingUtilities.getDeepestComponentAt(c, evt.getX(), evt.getY()); if (c != c2) printVars(+c, +c2); new PopupMenuMaker maker; maker.event(evt).existingMenu(menu).fillMenu( _menu -> fillMenu.get(evt.getComponent(), _menu)).run(); }); }); }