<div dir="ltr">Thank you all for the feedback.<div><br></div><div>I believe the documentation for the Stage class could benefit from additional clarification. I will draft some suggestions and submit them for review.</div><div><br></div><div>-- Thiago</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Em qua., 9 de abr. de 2025 às 12:28, Martin Fox <<a href="mailto:martinfox656@gmail.com">martinfox656@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>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="m_6225758301214110711lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Apr 9, 2025, at 8:08 AM, Andy Goryachev <<a href="mailto:andy.goryachev@oracle.com" target="_blank">andy.goryachev@oracle.com</a>> wrote:</div><br><div><div style="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;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<u></u><u></u></span></div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></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="m_6225758301214110711cid:image001.png@01DBA925.BCAC1580"><image001.png></span></span><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u><u></u></span></div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></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.<u></u><u></u></span></div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></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.<u></u><u></u></span></div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></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<u></u><u></u></span></div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></div><div id="m_6225758301214110711mail-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;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> </span></span></b><span style="font-size:12pt">openjfx-dev <<a href="mailto:openjfx-dev-retn@openjdk.org" target="_blank">openjfx-dev-retn@openjdk.org</a>> on behalf of Thiago Milczarek Sayão <<a href="mailto:thiago.sayao@gmail.com" target="_blank">thiago.sayao@gmail.com</a>><br><b>Date:<span> </span></b>Wednesday, April 9, 2025 at 03:56<br><b>To:<span> </span></b>openjfx-dev <<a href="mailto:openjfx-dev@openjdk.org" target="_blank">openjfx-dev@openjdk.org</a>><br><b>Subject:<span> </span></b>Help test the behavior of a multi-screen setup with both Mac and Windows<u></u><u></u></span></p></div><div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:12pt">Hi,<u></u><u></u></span></div><div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:12pt"><u></u> <u></u></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!<u></u><u></u></span></div></div><div><div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:12pt"><u></u> <u></u></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). <u></u><u></u></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.<u></u><u></u></span></div></div><div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:12pt"><u></u> <u></u></span></div></div><div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:12pt">Thanks!<u></u><u></u></span></div></div><div><div style="margin:0in;font-size:10pt;font-family:Aptos,sans-serif"><span style="font-size:12pt"><u></u> <u></u></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></div></blockquote></div>