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

win32: fix resizing window when maximized #14127

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kasper93
Copy link
Contributor

This remembers and sets window-scale when exiting maximized state. Also fixes not staying in maximized state when exiting fullscreen mode.

Fixes: #14126

@kasper93
Copy link
Contributor Author

@na-na-hi: I actually had this patch in my local branch for a long time, you could check if you'd like, but for me it was working fine for long time.

Copy link

github-actions bot commented May 12, 2024

Download the artifacts for this pull request:

Windows
macOS

@na-na-hi
Copy link
Contributor

With the fullscreen - maximize - set geometry 500x500 - unfullscreen sequence, the window no longer changes to the specified geometry after unfullscreen. Although current master doesn't unset the maximized state in this case so it's also wrong.

@kasper93
Copy link
Contributor Author

Maybe this time, it restores the size.

This remembers and sets window-scale when exiting maximized state. Also
fixes not staying in maximized state when exiting fullscreen mode.

Fixes: mpv-player#14126
@na-na-hi
Copy link
Contributor

It still doesn't restore to the specified geometry for me.

@kasper93 kasper93 marked this pull request as draft May 12, 2024 19:20
@kasper93
Copy link
Contributor Author

kasper93 commented Jun 2, 2024

It still doesn't restore to the specified geometry for me.

@na-na-hi: I've taken a look again at this. It seems to work correctly for me.

  1. set fullscreen yes
  2. set window-maximized yes
  3. set geometry 500x500
  4. set fullscreen no
  5. set window-maximized no

Window is 500x500 after this sequence. Could you help me reproduce the issue?

EDIT:

Or you mean at step 4. it should already go into 500x500 window? I think we have to align on the behavior here. Should set geometry cancel fullscreen and/or window-maximized?

@na-na-hi
Copy link
Contributor

na-na-hi commented Jun 2, 2024

Or you mean at step 4. it should already go into 500x500 window?

Yes, this is the current expectation. Setting geometry unmaximizes the window to the specified size. If the window is fullscreen, it's applied when exiting fullscreen.

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.

--no-title-bar mode the title bar appears after toggling fullscreen and window-maximized
2 participants