[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: 8277122: SplitPane divider drag can hang the layout [v4]
From:       Ajit Ghaisas <aghaisas () openjdk ! java ! net>
Date:       2022-01-31 12:38:17
Message-ID: 8g84uTwxP2cxP9Tvhw7WxF2acXkYCZkMoDWY9S7DuHU=.a8ccf23a-560c-4fb0-af1c-3ca4df2c4e04 () github ! com
[Download RAW message or body]

On Thu, 27 Jan 2022 20:48:40 GMT, Marius Hanl <mhanl@openjdk.org> wrote:

> > When a divider is moved via drag or code it will call **requestLayout()** for the \
> > **SplitPane**. While this is fine, it is also called when the \
> > **SplitPaneSkin#layoutChildren(..)** method is repositioning the divider. 
> > This makes no sense since we are currently layouting everything, so we don't need \
> > to request it again. (The divider positioning is the first part of \
> > **layoutChildren(..)**. In the second part the SplitPane content is layouted \
> > based off those positions) 
> > -> With this behaviour the layout may hang under some conditions (check attached \
> > source). The problem is that the **requestLayout()** will mark the **SplitPane** \
> > dirty but won't propagate to the parent since the **SplitPane** is currently \
> > doing a layout. 
> > This PR fixes this by not requesting layout when we are currently doing it (and \
> > thus repositioning the dividers as part of it). 
> > Note: I also fixed a simple typo of a private method in SplitPaneSkin:
> > initializeDivderEventHandlers -> initializeDiv**i**derEventHandlers
> 
> Marius Hanl has updated the pull request incrementally with one additional commit \
> since the last revision: 
> 8277122: Added and used global stageLoader + changed copyright year to 2022

The fix looks good. +1.

-------------

Marked as reviewed by aghaisas (Reviewer).

PR: https://git.openjdk.java.net/jfx/pull/669


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic