Re: RFR: 8260528: Clean glass-gtk sizing and positioning code [v42]

2022-12-23 Thread Thiago Milczarek Sayao
On Fri, 23 Dec 2022 18:47:37 GMT, Thiago Milczarek Sayao wrote: >> This cleans size and positioning code, reducing special cases, code >> complexity and size. >> >> Changes: >> >> - cached extents: 28, 1, 1, 1 are old defaults - modern gnome uses different >> sizes. It does not assume any si

Node.lookupAll behaves differently before Scene is shown

2022-12-23 Thread Scott Palmer
I just want to make sure this is not expected behaviour. I don’t think so, the documentation for lookupAll doesn’t mention anything related, but maybe I missed something somewhere else. I was just coding something to query the Scene for all SplitPanes and save/restore the divider positions for

Re: RFR: 8293119: Additional constrained resize policies for Tree/TableView [v27]

2022-12-23 Thread Andy Goryachev
On Fri, 23 Dec 2022 20:51:14 GMT, Andy Goryachev wrote: >> The current CONSTRAINED_RESIZE_POLICY has a number of issues as explained in >> [JDK-8292810](https://bugs.openjdk.org/browse/JDK-8292810). >> >> We propose to address all these issues by replacing the old column resize >> algorithm wi

Re: RFR: 8293119: Additional constrained resize policies for Tree/TableView [v27]

2022-12-23 Thread Andy Goryachev
> The current CONSTRAINED_RESIZE_POLICY has a number of issues as explained in > [JDK-8292810](https://bugs.openjdk.org/browse/JDK-8292810). > > We propose to address all these issues by replacing the old column resize > algorithm with a different one, which not only honors all the constraints

Re: RFR: 8293119: Additional constrained resize policies for Tree/TableView [v26]

2022-12-23 Thread Andy Goryachev
> The current CONSTRAINED_RESIZE_POLICY has a number of issues as explained in > [JDK-8292810](https://bugs.openjdk.org/browse/JDK-8292810). > > We propose to address all these issues by replacing the old column resize > algorithm with a different one, which not only honors all the constraints

Re: RFR: 8293119: Additional constrained resize policies for Tree/TableView [v25]

2022-12-23 Thread Andy Goryachev
> The current CONSTRAINED_RESIZE_POLICY has a number of issues as explained in > [JDK-8292810](https://bugs.openjdk.org/browse/JDK-8292810). > > We propose to address all these issues by replacing the old column resize > algorithm with a different one, which not only honors all the constraints

Re: RFR: 8260528: Clean glass-gtk sizing and positioning code [v42]

2022-12-23 Thread Thiago Milczarek Sayao
> This cleans size and positioning code, reducing special cases, code > complexity and size. > > Changes: > > - cached extents: 28, 1, 1, 1 are old defaults - modern gnome uses different > sizes. It does not assume any size because it varies - it does cache because > it's unlikely to vary on t

Integrated: 8292922 - [Linux] No more drag events when new Stage is created in drag handler

2022-12-23 Thread Thiago Milczarek Sayao
On Sun, 18 Dec 2022 20:28:17 GMT, Thiago Milczarek Sayao wrote: > This PR was previously discussed on #905. > > The approach is to grab the keyboard focus so the window that originated the > drag will keep it. > > I did some cleanup on grabbing related functions as well. > > `gdk_keyboard_f

Re: RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile [v2]

2022-12-23 Thread Andy Goryachev
On Fri, 23 Dec 2022 17:26:22 GMT, Karthik P K wrote: >> Do you think it's worth doing this as a unit test? > > I think it is good to add unit test to test the example code. Only thing I'm > looking at is that if the example changes in future, we need to make sure > that corresponding `MyButton`

Re: RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile [v2]

2022-12-23 Thread Karthik P K
On Fri, 23 Dec 2022 17:01:14 GMT, Andy Goryachev wrote: >> I will check this and update here > > Do you think it's worth doing this as a unit test? I think it is good to add unit test to test the example code. Only thing I'm looking at is that if the example changes in future, we need to make s

Re: RFR: 8298728: Cells in VirtualFlow jump after resizing [v2]

2022-12-23 Thread Andy Goryachev
On Tue, 20 Dec 2022 17:49:13 GMT, Johan Vos wrote: >> When recalculating sizes, we often don't want the current index and/or >> offset to change. >> >> Allow to fix the index/offset when doing recalculations. >> >> Fix JDK-8298728 > > Johan Vos has updated the pull request incrementally with o

Re: RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile [v2]

2022-12-23 Thread Karthik P K
On Fri, 23 Dec 2022 16:52:02 GMT, Andy Goryachev wrote: >> Karthik P K has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix build error > > modules/javafx.graphics/src/main/java/javafx/css/StyleablePropertyFactory.java > line 124: > >>

Re: RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile

2022-12-23 Thread Karthik P K
On Fri, 23 Dec 2022 13:55:30 GMT, Karthik P K wrote: > In the javadoc example of `StyleablePropertyFactory` class, wrong parameter > was used while initializing `StyleableProperty`. > > Assigned the `CssMetadData` object to `SELECTED` variable returned by > `createBooleanCssMetaData` method c

Re: RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile [v2]

2022-12-23 Thread Andy Goryachev
On Fri, 23 Dec 2022 16:59:27 GMT, Karthik P K wrote: >> modules/javafx.graphics/src/main/java/javafx/css/StyleablePropertyFactory.java >> line 146: >> >>> 144: // StyleableProperty implementation reduced to one line >>> 145: private final {@literal StyleableProperty} selected = >>> 14

Re: RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile

2022-12-23 Thread Andy Goryachev
On Fri, 23 Dec 2022 13:55:30 GMT, Karthik P K wrote: > In the javadoc example of `StyleablePropertyFactory` class, wrong parameter > was used while initializing `StyleableProperty`. > > Assigned the `CssMetadData` object to `SELECTED` variable returned by > `createBooleanCssMetaData` method c

Re: RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile [v2]

2022-12-23 Thread Karthik P K
> In the javadoc example of `StyleablePropertyFactory` class, wrong parameter > was used while initializing `StyleableProperty`. > > Assigned the `CssMetadData` object to `SELECTED` variable returned by > `createBooleanCssMetaData` method called in anonymous inner-class class, > which is then

Re: RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile [v2]

2022-12-23 Thread Andy Goryachev
On Fri, 23 Dec 2022 17:01:14 GMT, Karthik P K wrote: >> In the javadoc example of `StyleablePropertyFactory` class, wrong parameter >> was used while initializing `StyleableProperty`. >> >> Assigned the `CssMetadData` object to `SELECTED` variable returned by >> `createBooleanCssMetaData` met

Re: RFR: 8292922 - [Linux] No more drag events when new Stage is created in drag handler [v7]

2022-12-23 Thread Andy Goryachev
On Fri, 23 Dec 2022 13:54:56 GMT, Thiago Milczarek Sayao wrote: >> This PR was previously discussed on #905. >> >> The approach is to grab the keyboard focus so the window that originated the >> drag will keep it. >> >> I did some cleanup on grabbing related functions as well. >> >> `gdk_ke

Re: RFR: 8251862: Wrong position of Popup windows at the intersection of 2 screens [v2]

2022-12-23 Thread Kevin Rushforth
> On Windows platforms with more than one screen, a PopupWindow created for a > Stage that straddles two windows will be drawn with an incorrect position and > screen scale if the majority of the Stage is on one screen, and the popup is > positioned on the other screen. In this case, the Stage i

Re: RFR: 8292922 - [Linux] No more drag events when new Stage is created in drag handler [v7]

2022-12-23 Thread Kevin Rushforth
On Fri, 23 Dec 2022 13:54:56 GMT, Thiago Milczarek Sayao wrote: >> This PR was previously discussed on #905. >> >> The approach is to grab the keyboard focus so the window that originated the >> drag will keep it. >> >> I did some cleanup on grabbing related functions as well. >> >> `gdk_ke

RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile

2022-12-23 Thread Karthik P K
In the javadoc example of `StyleablePropertyFactory` class, wrong parameter was used while initializing `StyleableProperty`. Assigned the `CssMetadData` object to `SELECTED` variable returned by `createBooleanCssMetaData` method called in anonymous inner-class class, which is then used while i

Re: RFR: 8292922 - [Linux] No more drag events when new Stage is created in drag handler [v7]

2022-12-23 Thread Thiago Milczarek Sayao
> This PR was previously discussed on #905. > > The approach is to grab the keyboard focus so the window that originated the > drag will keep it. > > I did some cleanup on grabbing related functions as well. > > `gdk_keyboard_focus()` is deprecated, so is `gdk_device*` functions in favor > of

Re: RFR: 8292922 - [Linux] No more drag events when new Stage is created in drag handler [v6]

2022-12-23 Thread Thiago Milczarek Sayao
On Fri, 23 Dec 2022 13:21:15 GMT, Kevin Rushforth wrote: >> Thiago Milczarek Sayao has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Grab drag focus on drag > > modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp line 353: >

Re: RFR: 8178368: Right alignment of text fields works incorrectly

2022-12-23 Thread Karthik P K
On Wed, 21 Dec 2022 10:58:50 GMT, Karthik P K wrote: > When Text width was more than TextField width, condition to update > `textTranslateX` was not getting satisfied as calculated value was negative. > Hence the text was getting aligned to previous `textTranslateX` value. > > Added else block

Re: RFR: 8292922 - [Linux] No more drag events when new Stage is created in drag handler [v6]

2022-12-23 Thread Kevin Rushforth
On Wed, 21 Dec 2022 12:56:12 GMT, Thiago Milczarek Sayao wrote: >> This PR was previously discussed on #905. >> >> The approach is to grab the keyboard focus so the window that originated the >> drag will keep it. >> >> I did some cleanup on grabbing related functions as well. >> >> `gdk_ke

Re: RFR: 8292922 - [Linux] No more drag events when new Stage is created in drag handler [v6]

2022-12-23 Thread Kevin Rushforth
On Wed, 21 Dec 2022 12:56:12 GMT, Thiago Milczarek Sayao wrote: >> This PR was previously discussed on #905. >> >> The approach is to grab the keyboard focus so the window that originated the >> drag will keep it. >> >> I did some cleanup on grabbing related functions as well. >> >> `gdk_ke

Re: RFR: 8178368: Right alignment of text fields works incorrectly

2022-12-23 Thread Kevin Rushforth
On Fri, 23 Dec 2022 10:17:04 GMT, Karthik P K wrote: > I will fix the issues with text alignment as part of this bug. In which case, I recommend to update the title of the JBS bug and this PR, since it is more than just right alignment that will be fixed. - PR: https://git.openjdk

Re: RFR: 8178368: Right alignment of text fields works incorrectly

2022-12-23 Thread Karthik P K
On Wed, 21 Dec 2022 10:58:50 GMT, Karthik P K wrote: > When Text width was more than TextField width, condition to update > `textTranslateX` was not getting satisfied as calculated value was negative. > Hence the text was getting aligned to previous `textTranslateX` value. > > Added else block