jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Fix window decorations (attempt)

Open calixtus opened this issue 1 year ago • 1 comments

Fixes #10731

  • [ ] Change in CHANGELOG.md described 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.

calixtus avatar Jun 30 '24 06:06 calixtus

Note: The x values are "somehow" globally for multiple screens:

Example for

image

[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)]

koppor avatar Jul 01 '24 10:07 koppor

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.

koppor avatar Jul 01 '24 10:07 koppor

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.

koppor avatar Jul 01 '24 10:07 koppor

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.

koppor avatar Jul 01 '24 10:07 koppor

Related https://bugs.openjdk.org/browse/JDK-8326619

Siedlerchr avatar Jul 10 '24 11:07 Siedlerchr

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.

koppor avatar Aug 02 '24 12:08 koppor

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

github-actions[bot] avatar Aug 02 '24 12:08 github-actions[bot]