Hi, There is a regression in 5.0.16: VB window position is not restored correctly on start-up. I created a ticket for this: https://www.virtualbox.org/ticket/15226
But I think I found the source of the problem and solution to it. The version 5.0.16 introduces a very strange piece of code: if (fOk && geometry.intersects(availableGeometry)) geometry.moveCenter(availableGeometry.center()); That is: If the currently calculated VB window position intersects with the screen which contains the window's top left corner, then move the window to the center of the screen. Where's logic in that? Of course the window will ALWAYS intersect with the screen it's top left corner is located on. Therefore, the window will always be centered. I'm not sure what it was intended to implement here. Most probably: If the window is not fully located within the screen, then move it to the center. I implemented this solution, quick test showed that it indeed fixes the problem. Patch is attached, MIT licensed. P.S. As you can see, the logWindowGeometry() already uses the same algorithm, though I'm not sure why it required proper containment - being just on the edge of the screen may be very convenient, and I wouldn't want VB to reset my window position from the edge to the center, so I replaced true with false. -- Bye. With best regards, Konstantin Vlasov.
vb-5.0.16-saved-window-position-fix.patch
Description: Binary data
_______________________________________________ vbox-dev mailing list vbox-dev@virtualbox.org https://www.virtualbox.org/mailman/listinfo/vbox-dev