| Summary: | [Patch] [Windows] Borderless windows at desktop res resized by OS | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ethan Lee <flibitijibibo> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus, veg |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
| Attachments: |
Avoid GetClientRect and use LPWINDOWPOS for positioning
Working patch, adds WM_WINDOWPOSCHANGING message handler |
||
|
Description
Ethan Lee
2016-08-05 01:32:59 UTC
Quick update on the fix - it seems the problem is specifically with GetClientRect, not necessarily the event: https://github.com/renaudbedard/fez-1.12-issues/issues/122#issuecomment-237852505 My guess is that the ClientRect being different from the full window size is affecting the position of future SetPositions, even after we've removed the window border. We'll keep looking at this before 1.12 hits. Created attachment 2537 [details]
Avoid GetClientRect and use LPWINDOWPOS for positioning
Attached is a patch that avoids GetClientRect as well as ClientToScreen and uses the LPWINDOWPOS lParam to determine window position/size, which appears to fix the issue for us.
Created attachment 2538 [details] Working patch, adds WM_WINDOWPOSCHANGING message handler Hi there. I'm the author of previous patch for this issue. Unfortunately, I had misunderstood the MSDN, as the result my previous patch is wrong. More details: https://github.com/renaudbedard/fez-1.12-issues/issues/122#issuecomment-237920354 New patch is in the attachment. (In reply to Evgeny Vrublevsky from comment #3) > New patch is in the attachment. This patch is now https://hg.libsdl.org/SDL/rev/3b789a491509, thanks! --ryan. |