From 3a8a55a545cc3fd795ed849104a6cf536b04f43e Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 26 Jan 2025 13:59:46 +0100 Subject: [PATCH] Linux with FlatLaf window decorations: right and bottom window resize drag areas were 2px smaller than at left and top sides --- .../java/com/formdev/flatlaf/ui/FlatWindowResizer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java index a7a77b08..99f0817e 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java @@ -119,9 +119,10 @@ public abstract class FlatWindowResizer int x = 0; int y = 0; - int width = resizeComp.getWidth(); - int height = resizeComp.getHeight(); - if( width == 0 || height == 0 ) + Container cont = topDragComp.getParent(); + int width = cont.getWidth(); + int height = cont.getHeight(); + if( width <= 0 || height <= 0 ) return; Insets resizeInsets = getResizeInsets();