mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
Window decorations: reduced number of FlatTitlePane.updateNativeTitleBarHeightAndHitTestSpots() invokations
This commit is contained in:
@@ -711,8 +711,14 @@ debug*/
|
|||||||
return window != null && FlatNativeWindowBorder.hasCustomDecoration( window );
|
return window != null && FlatNativeWindowBorder.hasCustomDecoration( window );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// used to invoke updateNativeTitleBarHeightAndHitTestSpots() only once from latest invokeLater()
|
||||||
|
private int laterCounter;
|
||||||
|
|
||||||
protected void updateNativeTitleBarHeightAndHitTestSpotsLater() {
|
protected void updateNativeTitleBarHeightAndHitTestSpotsLater() {
|
||||||
|
laterCounter++;
|
||||||
EventQueue.invokeLater( () -> {
|
EventQueue.invokeLater( () -> {
|
||||||
|
laterCounter--;
|
||||||
|
if( laterCounter == 0 )
|
||||||
updateNativeTitleBarHeightAndHitTestSpots();
|
updateNativeTitleBarHeightAndHitTestSpots();
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user