Linux: ensure that old LinuxPopupMenuCanceler window listener is removed before adding a new one (issue #962)
Some checks failed
CI / build (11) (push) Has been cancelled
CI / build-on (17, ) (push) Has been cancelled
CI / build-on (21, ) (push) Has been cancelled
CI / build-on (23, ) (push) Has been cancelled
CI / build-on (8, ) (push) Has been cancelled
CI / snapshot (push) Has been cancelled
CI / release (push) Has been cancelled

(did not yet happen...)
This commit is contained in:
Karl Tauber
2025-07-12 16:28:49 +02:00
parent 04ad21b5b6
commit f71dbb2647

View File

@@ -70,6 +70,8 @@ class LinuxPopupMenuCanceler
}
private void addWindowListeners( MenuElement selected ) {
removeWindowListeners();
// see BasicPopupMenuUI.MouseGrabber.grabWindow()
Component invoker = selected.getComponent();
if( invoker instanceof JPopupMenu )