mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 06:50:56 +03:00
Popup: no longer use popup.show() for already visible popup window to avoid that inactive owner window becomes active (issue #1037)
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
This commit is contained in:
@@ -13,6 +13,8 @@ FlatLaf Change Log
|
|||||||
#### Fixed bugs
|
#### Fixed bugs
|
||||||
|
|
||||||
- Tree and List: Fixed painting of rounded drop backgrounds. (issue #1023)
|
- Tree and List: Fixed painting of rounded drop backgrounds. (issue #1023)
|
||||||
|
- Popup: Showing tooltip in inactive window brought that window to front (made
|
||||||
|
it active) and potentially hid the previously active window. (issue #1037)
|
||||||
- macOS: Fixed window "flashing" when switching from a light to a dark theme (or
|
- macOS: Fixed window "flashing" when switching from a light to a dark theme (or
|
||||||
vice versa). Especially when using animated theme changer (see
|
vice versa). Especially when using animated theme changer (see
|
||||||
[FlatLaf Extras](flatlaf-extras)).
|
[FlatLaf Extras](flatlaf-extras)).
|
||||||
|
|||||||
@@ -546,7 +546,15 @@ public class FlatPopupFactory
|
|||||||
int x = popupWindow.getX();
|
int x = popupWindow.getX();
|
||||||
int y = popupWindow.getY();
|
int y = popupWindow.getY();
|
||||||
|
|
||||||
popup.show();
|
if( !popupWindow.isVisible() )
|
||||||
|
popup.show();
|
||||||
|
else {
|
||||||
|
// if the popup window is already visible (because it is reused),
|
||||||
|
// do not invoke Popup.show() because this would invoke Window.toFront(),
|
||||||
|
// which may have the side effect that an inactive owner window
|
||||||
|
// would be also moved to front and maybe hide previously active window
|
||||||
|
popupWindow.pack();
|
||||||
|
}
|
||||||
|
|
||||||
// restore popup window location if it has changed
|
// restore popup window location if it has changed
|
||||||
// (probably scaled when screens use different scale factors)
|
// (probably scaled when screens use different scale factors)
|
||||||
|
|||||||
Reference in New Issue
Block a user