mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
Linux: ensure that old LinuxPopupMenuCanceler window listener is removed before adding a new one (issue #962)
(did not yet happen...)
This commit is contained in:
@@ -70,6 +70,8 @@ class LinuxPopupMenuCanceler
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void addWindowListeners( MenuElement selected ) {
|
private void addWindowListeners( MenuElement selected ) {
|
||||||
|
removeWindowListeners();
|
||||||
|
|
||||||
// see BasicPopupMenuUI.MouseGrabber.grabWindow()
|
// see BasicPopupMenuUI.MouseGrabber.grabWindow()
|
||||||
Component invoker = selected.getComponent();
|
Component invoker = selected.getComponent();
|
||||||
if( invoker instanceof JPopupMenu )
|
if( invoker instanceof JPopupMenu )
|
||||||
|
|||||||
Reference in New Issue
Block a user