jfx
jfx copied to clipboard
8260528: Clean glass-gtk sizing and positioning code
This is a new approach to rewrite parts of gtk glass backend to be more clean.
I will provide small "manageable" PR to incrementally make the backend better.
This PR adresses cleanup of the Size and Positioning code. It makes code more "straightforward" and easier to maintain.
Current status (Ubuntu 20.04):

(*) Some of the iconify tests are also failing on the main branch.
gradlew -PFULL_TEST=true -PUSE_ROBOT=true :systemTests:test --tests test.robot.javafx.stage.IconifyTest on a second run produces 4 tests, 2 failures.
Progress
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
- [ ] Change must be properly reviewed
Issue
- JDK-8260528: Clean glass-gtk sizing and positioning code
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/367/head:pull/367
$ git checkout pull/367
Update a local copy of the PR:
$ git checkout pull/367
$ git pull https://git.openjdk.java.net/jfx pull/367/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 367
View PR using the GUI difftool:
$ git pr show -t 367
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/367.diff
:wave: Welcome back tsayao! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
Webrevs
- 26: Full - Incremental (9ff5a7b6)
- 25: Full (f4a13314)
- 24: Full - Incremental (0dd478a8dd30b12b9a0041508685b6a6d5d1a365)
- 23: Full - Incremental (6a48f2a673c468992e1ad4f7787a726866d4130b)
- 22: Full (34518b8eeab31b8485a302f9d8f70496405eb9cb)
- 21: Full - Incremental (c601603d28b30e215d02bda7de4570ea1f1bf510)
- 20: Full - Incremental (ece5f926b4fe2b73bc7c242d19afeecc1fb04198)
- 19: Full - Incremental (b5547410f98f1584939c7b570d57d215e229c623)
- 18: Full - Incremental (24b388f22b86c9f56ad3ae093aaab6d4d99b3b7a)
- 17: Full - Incremental (180a1ea9799805c81d6ab556bf94820506256bb1)
- 16: Full - Incremental (1d085aad479b746f26cdf2bab6f61d6f83b475cf)
- 15: Full - Incremental (41f48dc2e29c8db0d4fd42fe1afd65eb1bc7109a)
- 14: Full - Incremental (0de9fc96fd822bc9e114b364ebb81997b8b369e2)
- 13: Full - Incremental (5f8d773172c363aba720a065cf49fec7abe41e3f)
- 12: Full - Incremental (0c89a4dacd89ca9fe42fb48cd590cce30bd7c075)
- 11: Full - Incremental (6766502e647dad128d3191eba5c91e2cfcd87f51)
- 10: Full - Incremental (07219e709e6618e7fc75fae6a0c3519133fc3acd)
- 09: Full - Incremental (636114b5f78c0f316b3b8e9382f4467cc350a1a4)
- 08: Full - Incremental (30d5291e586f18b73a22db791ddb91e126956476)
- 07: Full - Incremental (fedccf5659be1519acbecb0d9fc8c509957e351b)
- 06: Full - Incremental (ff2f0f8e07880c1fbc230f8c3b5d1dada03b9cce)
- 05: Full - Incremental (b3b0adcd2e42db8cc73955403bce3767ab3afa06)
- 04: Full - Incremental (f04d3b403c858729743977fbfe73558fd4a2283c)
- 03: Full - Incremental (5f87da28e7bf56f88278709b4e01c065f262b6ee)
- 02: Full - Incremental (e8528ef26de729000a7d45a306d353ef66aef3ad)
- 01: Full - Incremental (2be1ba7e7e611bc0b53d8048b1968866157d18e7)
- 00: Full (bdfd0deb8ce503adb73a020f947752b2fd0946cd)
/reviewers 2
@kevinrushforth The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).
⚠️ @tsayao This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).
This does look like a much more manageable approach.
One thing to be aware of from a bookkeeping point of view is that a JBS issues is resolved by a single PR. Once a PR has been integrated for a given JBS bug ID, that bug ID cannot be reused.
This means that each separate PR will need it's own JBS issue to be filed, even if those enhancements taken together are part of a larger set of improvements. Incremental improvements are fine (and in this case a good way to proceed), but you might give some thought to the title of each such improvement. I wouldn't want to see 5 fixes go in each with the same title of Simplify and update glass gtk backend.
Changed to WIP to reduce sizing events.
Changed to WIP while we run some more tests to make sure latest changes are ok. I'm fixing some residual "extra resize" issues (these issues exists on the current versions, so this makes it better, hopefully).
Looks good now.
Testing:
master

tsayao:glass_gtk_new_position_and_size

--tests test.robot.javafx.scene.RobotTest causes some intermittent error but eventually all passes.
I ran the full test on Ubuntu 20.10 and the results look fine. I do not see any new failure.
I ran the full test on OL 8.2 and the results look fine.
@tsayao The work in this PR looks really good. If you want to continue with this, I will review it. There are some conflicts but those can easily be solved.
/reviewers 2
@kevinrushforth The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).
@tsayao this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:
git checkout glass_gtk_new_position_and_size
git fetch https://git.openjdk.org/jfx master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push
@johanvos I think I can rework it better now.
@johanvos I think I can rework it better now.
Do you mean you want to close this PR and create a new one? That's fine -- let me know if you need some help or a first review even before it's ready.
@johanvos Yes, I have started working on it at https://github.com/tsayao/jfx/tree/clean_glass_gtk
Closed in favor of #915