Skip to content

Commit

Permalink
Limit custom handling of scaled maximized window bounds to Windows
Browse files Browse the repository at this point in the history
Only apply that separate code path for pre-Java 15 on Windows. For #13.
  • Loading branch information
kirill-grouchnikov committed Jan 20, 2022
1 parent 1a98fd6 commit 5778767
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ private fun AuroraWindowScope.WindowTitlePane(
// See https://bugs.openjdk.java.net/browse/JDK-8176359,
// https://bugs.openjdk.java.net/browse/JDK-8231564 and
// https://bugs.openjdk.java.net/browse/JDK-8243925 that went into Java 15.
val maximizedWindowBounds = if (Runtime.version().feature() < 15)
val isWindows = System.getProperty("os.name")?.startsWith("Windows")
val maximizedWindowBounds = if ((isWindows == true) && (Runtime.version().feature() < 15))
Rectangle(
0, 0,
(screenBounds.width * current.graphicsConfiguration.defaultTransform.scaleX).toInt(),
Expand Down

0 comments on commit 5778767

Please sign in to comment.