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

[Patch] [Windows] Borderless windows at desktop res resized by OS #2228

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

[Patch] [Windows] Borderless windows at desktop res resized by OS #2228

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: Windows (All), All

Comments on the original bug report:

On 2016-08-05 01:32:59 +0000, Ethan Lee wrote:

We're currently in the process of testing the FEZ 1.12 update and found that on Windows, borderless windows at the full desktop res (i.e. not-quite-FULLSCREEN_DESKTOP-fullscreen) get resized and repositioned by the OS behind our backs, resulting in weird-looking windows...

http://veg.by/z/2016-07-20-16-42-40-ee331be2.png

We found that the cause is the WM_WINDOWPOSCHANGED event, and adding a check for upcoming resize events fixes the problem:

renaudbedard/fez-1.12-issues#122 (comment)

There's a chance that this affects other window managers in similar ways, but for now we at least have a fix for Windows.

On 2016-08-05 13:50:27 +0000, Ethan Lee wrote:

Quick update on the fix - it seems the problem is specifically with GetClientRect, not necessarily the event:

renaudbedard/fez-1.12-issues#122 (comment)

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.

On 2016-08-05 15:30:51 +0000, Ethan Lee wrote:

Created attachment 2537
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.

On 2016-08-05 18:21:51 +0000, Evgeny Vrublevsky wrote:

Created attachment 2538
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:
renaudbedard/fez-1.12-issues#122 (comment)

New patch is in the attachment.

On 2016-09-30 03:13:43 +0000, Ryan C. Gordon wrote:

(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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant