mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
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
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:
@@ -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