You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using set_fullscreen() and set_maximized() together for window resizing, strange and counterintuitive behaviors will occur.
Steps To Reproduce
For now, let's only discuss the case where fullscreen is borderless fullscreen. (That is to say, Fullscreen::Borderless(None))
set_fullscreen(false) and set_maximized(false), we have a normal window. (√)
set_maximized(true), the window now enlarges and fills the monitor, except for the taskbar at the bottom. (√)
set_fullscreen(true), the window fullscreen works just fine, the decorations part (title bar) disappears, the bottom taskbar is also covered(There is still a problem here, but we don't discuss it for now.[1]), and the window fills the monitor completely. (√)
Here comes the point, we set_maximized(false), the window is restored to a normal size window, ignoring the fullscreen setting (we set it to true in step 3). At this time, is_fullscreen() returns true. (X)
Expected behavior
At this point, the behavior we expect should be to retain the borderless full screen (fill the monitor) and restore to a normal window when set_fullscreen(false) is called (because is_maximized() is already false at this time).
My thoughts
I think the error at this time is that the window size value of the borderless window is wrong.
The reason is that the Win32 window restores the window to a normal size window by setting SW_RESTORE through ShowWindow (it restores the normal window size value stored before the enlarged window). Because this single API does not consider that the borderless window is still full screen size at this time (even if it is borderless full screen).
We can observe that the window after step 4 has no decorations and cannot be resized. (Even if their value is true.) Therefore, we can assume that it is still a borderless fullscreen window, but there is a problem with the window size value.
Screenshots
Before step 1 (normal window):
After step 4 (wrong fulllscreen)
Platform and Versions (please complete the following information):
OS: Windows 11 Pro 24H2 (26100.3194)
Rustc: rustc 1.85.0 (4d91de4e4 2025-02-17)
Additional context
[1]: The config { decorations: false, fullscreen: true, maximized: true } will cause rendering errors in the taskbar below.
The text was updated successfully, but these errors were encountered:
Describe the bug
When using
set_fullscreen()
andset_maximized()
together for window resizing, strange and counterintuitive behaviors will occur.Steps To Reproduce
For now, let's only discuss the case where fullscreen is borderless fullscreen. (That is to say,
Fullscreen::Borderless(None)
)set_fullscreen(false)
andset_maximized(false)
, we have a normal window. (√)set_maximized(true)
, the window now enlarges and fills the monitor, except for the taskbar at the bottom. (√)set_fullscreen(true)
, the window fullscreen works just fine, the decorations part (title bar) disappears, the bottom taskbar is also covered(There is still a problem here, but we don't discuss it for now.[1]), and the window fills the monitor completely. (√)set_maximized(false)
, the window is restored to a normal size window, ignoring the fullscreen setting (we set it to true in step 3). At this time,is_fullscreen()
returns true. (X)Expected behavior
At this point, the behavior we expect should be to retain the borderless full screen (fill the monitor) and restore to a normal window when
set_fullscreen(false)
is called (becauseis_maximized()
is already false at this time).My thoughts
I think the error at this time is that the window size value of the borderless window is wrong.
The reason is that the Win32 window restores the window to a normal size window by setting SW_RESTORE through ShowWindow (it restores the normal window size value stored before the enlarged window). Because this single API does not consider that the borderless window is still full screen size at this time (even if it is borderless full screen).
We can observe that the window after step 4 has no decorations and cannot be resized. (Even if their value is true.) Therefore, we can assume that it is still a borderless fullscreen window, but there is a problem with the window size value.
Screenshots


Before step 1 (normal window):
After step 4 (wrong fulllscreen)
Platform and Versions (please complete the following information):
OS: Windows 11 Pro 24H2 (26100.3194)
Rustc: rustc 1.85.0 (4d91de4e4 2025-02-17)
Additional context
[1]: The config { decorations: false, fullscreen: true, maximized: true } will cause rendering errors in the taskbar below.
The text was updated successfully, but these errors were encountered: