<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">On macOS 15.3.2 I get the same results as Andy. When I press the top button glass asks the OS to move the window offscreen but the OS shifts the location 40 units to the left so it’s partially onscreen.<br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Apr 9, 2025, at 8:08 AM, Andy Goryachev <andy.goryachev@oracle.com> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Optima-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";">Here are the results on macOS 15.3.2, with the primary (retina, scale=2) at the bottom and the external (scale=1) at the top like so<o:p></o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";"><span id="cid:image001.png@01DBA925.BCAC1580"><image001.png></span></span><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";"><o:p></o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";">In both cases, the first button (Move To 1800.0) moves the window to the same screen partially outside of the viewing area (only about ~15% of the left side remains visible), while the other button (Move To 900.0) shifts to the right.<o:p></o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";">My setup uses the setting [Desktop & Dock -> Displays have separate Spaces OFF] so I can move the windows between the monitors.<o:p></o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";">-andy<o:p></o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Iosevka Fixed SS16";"><o:p> </o:p></span></div><div id="mail-editor-reference-message-container"><div><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0in 0in;"><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><b><span style="font-size: 12pt;">From:<span class="Apple-converted-space"> </span></span></b><span style="font-size: 12pt;">openjfx-dev <openjfx-dev-retn@openjdk.org> on behalf of Thiago Milczarek Sayão <thiago.sayao@gmail.com><br><b>Date:<span class="Apple-converted-space"> </span></b>Wednesday, April 9, 2025 at 03:56<br><b>To:<span class="Apple-converted-space"> </span></b>openjfx-dev <openjfx-dev@openjdk.org><br><b>Subject:<span class="Apple-converted-space"> </span></b>Help test the behavior of a multi-screen setup with both Mac and Windows<o:p></o:p></span></p></div><div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 12pt;">Hi,<o:p></o:p></span></div><div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 12pt;"><o:p> </o:p></span></div></div><div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 12pt;">Could anyone with a multi-screen setup on Mac and/or Windows please share the results of the two buttons on this sample app? Your feedback would be greatly appreciated!<o:p></o:p></span></div></div><div><div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 12pt;"><o:p> </o:p></span></div></div><div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 12pt;">On Ubuntu 24.04 the first button moves the Stage to the end of the first screen (bit weird). <o:p></o:p></span></div></div><div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 12pt;">The second work as expected, it gets moved to the start of the center of the last screen.<o:p></o:p></span></div></div><div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 12pt;"><o:p> </o:p></span></div></div><div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 12pt;">Thanks!<o:p></o:p></span></div></div><div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 12pt;"><o:p> </o:p></span></div></div><div><div><pre style="margin: 0in 0in 12pt; font-size: 10pt; font-family: "Courier New"; background: rgb(30, 31, 34);"><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.application.Application;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.geometry.Pos;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.geometry.Rectangle2D;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.scene.control.Button;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.scene.layout.VBox;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.stage.Screen;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.stage.StageStyle;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.application.Platform;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.scene.Scene;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.scene.layout.StackPane;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.scene.paint.Color;<br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">javafx.stage.Stage;<br><br></span><span style="color: rgb(207, 142, 109);">import </span><span style="color: rgb(188, 190, 196);">java.util.Comparator;<br><br></span><span style="color: rgb(207, 142, 109);">public class </span><span style="color: rgb(188, 190, 196);">TestScreenBounds </span><span style="color: rgb(207, 142, 109);">extends </span><span style="color: rgb(188, 190, 196);">Application {<br><br>    @Override<br>    </span><span style="color: rgb(207, 142, 109);">public void </span><span style="color: rgb(188, 190, 196);">start(Stage stage) {<br>        stage.setTitle(</span><span style="color: rgb(106, 171, 115);">"Move Outside Bounds"</span><span style="color: rgb(188, 190, 196);">);<br>        Rectangle2D bounds = Screen.getScreens().stream()<br>                .map(Screen::getBounds)<br>                .sorted(Comparator.comparingDouble(Rectangle2D::getMaxX).reversed())<br>                .findFirst()<br>                .orElseThrow();<br><br>        Button btn = </span><span style="color: rgb(207, 142, 109);">new </span><span style="color: rgb(188, 190, 196);">Button(</span><span style="color: rgb(106, 171, 115);">"Move To " </span><span style="color: rgb(188, 190, 196);">+ bounds.getMaxX());<br>        btn.setOnAction(event -> stage.setX(bounds.getMaxX()));<br><br>        </span><span style="color: rgb(207, 142, 109);">double </span><span style="color: rgb(188, 190, 196);">middleLastScreen = bounds.getMinX() + bounds.getWidth() / </span><span style="color: rgb(42, 172, 184);">2</span><span style="color: rgb(188, 190, 196);">;<br><br>        Button btn2 = </span><span style="color: rgb(207, 142, 109);">new </span><span style="color: rgb(188, 190, 196);">Button(</span><span style="color: rgb(106, 171, 115);">"Move To " </span><span style="color: rgb(188, 190, 196);">+ middleLastScreen);<br>        btn2.setOnAction(event -> stage.setX(middleLastScreen));<br><br>        VBox root = </span><span style="color: rgb(207, 142, 109);">new </span><span style="color: rgb(188, 190, 196);">VBox(btn, btn2);<br>        root.setFillWidth(</span><span style="color: rgb(207, 142, 109);">true</span><span style="color: rgb(188, 190, 196);">);<br>        root.setAlignment(Pos.CENTER);<br>        Scene scene = </span><span style="color: rgb(207, 142, 109);">new </span><span style="color: rgb(188, 190, 196);">Scene(root, </span><span style="color: rgb(42, 172, 184);">300</span><span style="color: rgb(188, 190, 196);">, </span><span style="color: rgb(42, 172, 184);">300</span><span style="color: rgb(188, 190, 196);">);<br>        stage.setScene(scene);<br>        stage.show();<br>    }<br><br>    </span><span style="color: rgb(207, 142, 109);">public static void </span><span style="color: rgb(188, 190, 196);">main(String[] args) {<br>        launch(TestScreenBounds.</span><span style="color: rgb(207, 142, 109);">class</span><span style="color: rgb(188, 190, 196);">, args);<br>    }<br>}</span></pre></div></div></div></div></div></div></div></div></div></blockquote></div><br></body></html>