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

Avoid truncated window size after going from fullscreen to a window of the same size #214

Merged
merged 1 commit into from
Jun 18, 2012

Conversation

cwalther
Copy link
Contributor

As discussed at https://bitbucket.org/OpenUru_org/cwe-ou/pull-request/18/fix-improperly-calculated-window-size-in#comment-8535 :

When going from fullscreen to windowed without changing the resolution, the window would end up smaller than intended, because the display resolution was still small (not reset to the full desktop resolution yet) at the time the window size was set, and Windows would clamp the total window size to slightly larger than the display resolution.

The display resolution must be reset before setting the window size (as the old Cyan code did).

I also found that on Windows XP, for whatever reason, setting window style WS_VISIBLE appears necessary to prevent the contents of the previous window from staying behind when going from windowed to a smaller window.

Tested on Windows XP (in CWE-ou only) and Windows 7 (CWE-ou and H-uru/Plasma).

…f the same size.

Must set the window size after the display resolution, otherwise Windows may clamp it to a smaller size than specified.
@Hoikas
Copy link
Member

Hoikas commented Jun 18, 2012

Works as advertised. Thanks!

Hoikas added a commit that referenced this pull request Jun 18, 2012
Avoid truncated window size after going from fullscreen to a window of the same size
@Hoikas Hoikas merged commit 9096549 into H-uru:master Jun 18, 2012
Deledrius pushed a commit to Deledrius/Plasma that referenced this pull request Dec 4, 2012
Avoid truncated window size after going from fullscreen to a window of the same size
Hoikas added a commit to Hoikas/Plasma that referenced this pull request Dec 13, 2012
Avoid truncated window size after going from fullscreen to a window of the same size
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

Successfully merging this pull request may close these issues.

None yet

2 participants