Closed dziemborowicz closed 8 years ago
I cannot repro this bug. I have tried with single and multiple windows on one or many monitors.
Have some more information. Looks like the bug is hit when the windows are touching the screen borders. Seems to be a bug in the code that detects whether the window will be on the screen after it is restored.
Screenshots of working case:
Screenshots of failing case (before and after):
I have an update on this. The problem is that, on Windows 10, windows are actually 8 pixels (or some other amount depending on DPI settings perhaps) bigger than they appear. You can see this by hovering your mouse close to the edge of the window: you will see the resize window arrows before you actually move the mouse over the window.
Hourglass centers the window if it determines that it would be shown off the user's desktop, and at the moment this means it centers the window if any part of the window, including the invisible window borders, is outside the user's desktop.
The fix is relatively straightforward: the code that checks that the window will be visible on the screen after it is displayed has to account for this invisible window border.
I just need to find some time to make the change...
Great, I'll be looking forward to see that fix in action! thanks.
I have changed the logic for determining if the window is visible to check if the point in the center of the timer window is on the screen rather than checking that the window is entirely on the screen.
This works around the invisible border problem without having to do all kinds of gymnastics, and still serves the original purpose, which was to ensure that the window is not restored to a state where the user cannot see it at all.
This was received as a bug report via email.