Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCP-ng Center 8.0.1 'Forgets' Window Position & Size When Placed Near Edge of Display #177

Closed
amp88 opened this issue Feb 5, 2020 · 2 comments
Labels
bug Something isn't working fixed
Milestone

Comments

@amp88
Copy link

amp88 commented Feb 5, 2020

When XCP-ng Center 8.0.1 is placed near the edge of a display and closed, the next time it's run it 'forgets' the last window position and size it had before it was closed.

Steps to reproduce the behaviour:

  1. Open XCP-ng Center 8.0.1
  2. Move the XCP-ng Center window to just inside the top left corner of your display (or the top left corner of the leftmost display in a multi-monitor setup).
  3. Close XCP-ng Center
  4. Open XCP-ng Center
  5. Its window position and size are reset to default values.

XCP-ng Center should be able to restore the window position and size, as long as they are legal values (i.e. the window location and size falls within the bounds of an active display).

However, it appears the values for WindowLocation and WindowSize stored in the 'user.config' file when XCP-ng Center exits are not correct. When the window is moved to within a couple of pixels of the top left corner of the display, the stored WindowLocation will have a negative x value. I suspect this may be as simple as having a border around the main window, which increases the effective window size, but I'm unable to test this at the moment. The WindowSize property in 'user.config' also appears to be larger than the window was when XCP-ng Center was closed (by 15 pixels in width and 8 pixels in height, I believe).

Desktop OS: Windows 10 Pro 1903
XCP-ng Center version: 8.0.1.26 and Nightly/dev build 99.99.99.27

@borzel
Copy link
Member

borzel commented Feb 6, 2020

can you please test again with the latest nightly 99.99.99.28 ?
I can confirm, it's a bug :-/

@borzel borzel added the bug Something isn't working label Feb 6, 2020
@borzel
Copy link
Member

borzel commented Feb 7, 2020

fixed: efc7824

If the window was maximized or the values are outside of the boundaries of the screen, XCP-ng Center will be restored maximized.

The more advanced solution is to check the "unvisible" border. But this depends on the exact windows theme I think.

If you need a more advanced solution, please open a new ticket :-)

@borzel borzel added the fixed label Feb 7, 2020
@borzel borzel added this to the 2020.01 milestone Feb 7, 2020
@borzel borzel closed this as completed Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants