[vbox-dev] [SPAM] Re: [SPAM] 5.0.16 regression: window position not saved
flint at flint-inc.ru
Thu Mar 10 11:46:47 UTC 2016
Would you mind describing a bit more detailed what exactly looks wrong in my
Actually, I thought that the idea of centering the window is not so good.
Suppose I close the window a tiny bit outside of my screen edge (maybe not even
noticing it), and next start I'm going to get it centered, totally away from the
previous position. I think it would be better to move the window just into the
screen so that it located at the very edge it was earlier crossing.
Sending you another patch with implementation of this idea, it replaces the
previously sent patch. MIT license.
> Thanks for noticing the issue.
> Our idea was to make off-screen windows to be *fully* visible again in
> consistent with default behavior on other platforms. However your patch does not take care of this fully.
> We will fix this from our side.
> Thanks and Best Regards
> On 09.03.2016 13:40, Власов Константин wrote:
> There is a regression in 5.0.16: VB window position is not restored correctly on
> start-up. I created a ticket for this:
> 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))
> 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
> 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.
> vbox-dev mailing list
> vbox-dev at virtualbox.org
Bye. With best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4370 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20160310/03048157/attachment.obj
More information about the vbox-dev