Skip to content

Commit

Permalink
FlatLaf window decorations: fixed sometimes broken window moving with…
Browse files Browse the repository at this point in the history
… SplitPane in window title area in "full window content" mode (issue #926)
  • Loading branch information
DevCharly committed Dec 4, 2024
1 parent 3f33543 commit 1dcb251
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ FlatLaf Change Log
factor. (issue #904)
- Linux: Fixed continuous cursor toggling between resize and standard cursor
when resizing window. (issue #907)
- Fixed sometimes broken window moving with SplitPane in window title area in
"full window content" mode. (issue #926)
- Popup: On Windows 10, fixed misplaced popup drop shadow. (issue #911;
regression in 3.5)
- Popup: Fixed NPE if `GraphicsConfiguration` is `null` on Windows. (issue #921)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,18 @@ private boolean isTitleBarCaptionAt( Component c, int x, int y ) {
// if component is not fully layouted, do not invoke function
// because it is too dangerous that the function tries to layout the component,
// which could cause a dead lock
if( !c.isValid() )
if( !c.isValid() ) {
// revalidate if necessary so that it is valid when invoked again later
EventQueue.invokeLater( () -> {
Window w = SwingUtilities.windowForComponent( c );
if( w != null )
w.revalidate();
else
c.revalidate();
} );

return false; // assume that this is not a caption because the component has mouse listeners
}

if( caption instanceof Function ) {
// check client property function value
Expand Down

0 comments on commit 1dcb251

Please sign in to comment.