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

List:       openjdk-openjfx-dev
Subject:    Integrated: 8277122: SplitPane divider drag can hang the layout
From:       Marius Hanl <mhanl () openjdk ! java ! net>
Date:       2022-01-31 15:03:15
Message-ID: rRB5sDmMScY2gJEp1ykutseeiE_9_liaxmQgsowSMjI=.d28e92b4-6512-422f-ac85-50ddc9fce0fa () github ! com
[Download RAW message or body]

On Mon, 15 Nov 2021 14:34:04 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

This pull request has now been integrated.

Changeset: ee52d146
Author:    Marius Hanl <mhanl@openjdk.org>
Committer: Jeanette Winzenburg <fastegal@openjdk.org>
URL:       https://git.openjdk.java.net/jfx/commit/ee52d14653996921a9bd30e9b568151d3d4d06de
                
Stats:     84 lines in 2 files changed: 76 ins; 1 del; 7 mod

8277122: SplitPane divider drag can hang the layout

Reviewed-by: fastegal, aghaisas

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

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