Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrong maximized window offset on non primary monitors (#1921)
The overhang of a maximized window is currently calculated with this: ```cpp auto offset = 0; if (rcMaximum.left == 0) { offset = windowPos->x; } else if (rcMaximum.top == 0) { offset = windowPos->y; } ``` This always works on the primary monitor but on a non primary monitor, it isn't always the case that `left` or `top` can be 0. Examples are when you offset a monitor. In those cases, `offset` will be 0 and the window will be cut off. Instead I've changed the calculation to calculate the width of the windows frame which is how much it would overhang. Admittedly, the old calculation could be kept and take into consideration the current monitor.
- Loading branch information