From 401b0afe9f56f1e3bba71218e2279e67bcca5c41 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Wed, 12 Mar 2025 12:37:06 +0100 Subject: [PATCH] remove unnecessary code --- .../ui/mainwindow/MainWindowController.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/mainwindow/MainWindowController.java b/src/main/java/org/cryptomator/ui/mainwindow/MainWindowController.java index 18db5e5ac..203f50085 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/MainWindowController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/MainWindowController.java @@ -95,16 +95,6 @@ public class MainWindowController implements FxController { int width = settings.windowWidth.get(); int height = settings.windowHeight.get(); - // Minimizing a window in Windows and closing it could result in an out of bounds position at (x, y) = (-32000, -32000) - // See https://devblogs.microsoft.com/oldnewthing/20041028-00/?p=37453 - // If the position is (-32000, -32000), restore to the last saved position - if (window.getX() == -32000 && window.getY() == -32000) { - window.setX(x); - window.setY(y); - window.setWidth(width); - window.setHeight(height); - } - Rectangle2D primaryScreenBounds = Screen.getPrimary().getBounds(); if (!isWithinDisplayBounds(x, y, width, height)) { //use stored window position LOG.debug("Resetting window position due to insufficient screen overlap");