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

fix(windows): decoupling the effects of switching between fullscreen and maximized. #1088

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

owtotwo
Copy link

@owtotwo owtotwo commented Mar 5, 2025

Problem

As mentioned here

Detials

set_maximized(false) will fire the SW_RESTORE, and it disturbs the state of the borderless fullscreen.
To be precise, the window size that should have kept the full screen has been changed (to normal window size).

Solution

  1. Use SetWindowLongW(... !WS_MAXIMIZE ...) instead of ShowWindow(..., SW_RESTORE) to set the maximized state off.
  2. Use placement.showCmd to make it correct for set_fullscreen(false) when the window is maximized or not.

@owtotwo owtotwo requested a review from a team as a code owner March 5, 2025 09:50
@lucasfernog lucasfernog requested a review from amrbashir March 7, 2025 10:40
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.

1 participant