Fix window decorations (attempt)
Fixes #10731
- [ ] Change in
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable) - [ ] Tests created for changes (if applicable)
- [x] Manually tested changed features in running JabRef (always required)
- [ ] Screenshots added in PR description (for UI changes)
- [ ] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
- [ ] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.
Note: The x values are "somehow" globally for multiple screens:
Example for
[javafx.stage.Screen@ede6e680 bounds:Rectangle2D [minX=0.0, minY=0.0, maxX=1600.0, maxY=2560.0, width=1600.0, height=2560.0] visualBounds:Rectangle2D [minX=0.0, minY=156.0, maxX=1600.0, maxY=2560.0, width=1600.0, height=2404.0] dpi:125.0 outputScale:(1.5,1.5), javafx.stage.Screen@42b22ab3 bounds:Rectangle2D [minX=5440.0, minY=96.0, maxX=6880.0, maxY=2656.0, width=1440.0, height=2560.0] visualBounds:Rectangle2D [minX=5440.0, minY=96.0, maxX=6880.0, maxY=2616.0, width=1440.0, height=2520.0] dpi:108.0 outputScale:(1.0,1.0), javafx.stage.Screen@21359912 bounds:Rectangle2D [minX=1600.0, minY=232.0, maxX=5440.0, maxY=2392.0, width=3840.0, height=2160.0] visualBounds:Rectangle2D [minX=1600.0, minY=232.0, maxX=5440.0, maxY=2352.0, width=3840.0, height=2120.0] dpi:139.0 outputScale:(1.0,1.0)]
I enabled debug output, added more things to debug output and included also more checks for "out of bounds". Lets see, if this matches more cases.
Note that the updated code also should keep https://github.com/JabRef/jabref/issues/5037 fixed.
I did not add some new preference to store the JabRef X and Y position depending on the screen where JabRef "lives". This can be a follow up (if users ask for it). Update https://github.com/JabRef/jabref/issues/7341 asks for it.
We could always save the screen position if user moves the window. In case the user fixes the window position and then maximizes JabRef and then quits, the user-fixed window position is not stored.
Related https://bugs.openjdk.org/browse/JDK-8326619
There was no follow-up on my PR comment. I think, it is good to go as is, since it brings things forward (and unblocks https://github.com/JabRef/jabref/pull/11441).
Therefore, approved and added to the merge queue.
The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.