ID:2924219
 
Resolved
The is-fullscreen parameter behaved incorrectly when the window was maximized beforehand.
BYOND Version:515
Operating System:Windows 10 Pro 64-bit
Web Browser:Firefox 125.0
Applies to:Dream Seeker
Status: Resolved (515.1639)

This issue has been resolved.
Descriptive Problem Summary:
Winsetting is-fullscreen to true will cause the window to bleed onto the adjacent screen, not cover the taskbar and go slightly outside of the main screen if the window is maximized before the winset.

Numbered Steps to Reproduce Problem:
1) Maximize the game window
2) winset it to is-fullscreen=true

Code Snippet (if applicable) to Reproduce Problem:
mob
verb
// causes bleeding onto another screen and doesn't fullscreen
// here we are forcing window to be maximized before enabling fullscreen
tfs_b()
set name = "toggle fullscreen is-maximized=true"
var/fullscreen = winget(usr, "mainwindow", "is-fullscreen") == "true"
fullscreen = !fullscreen
if(fullscreen)
winset(usr, "mainwindow", "is-maximized=true")
winset(usr, "mainwindow", "is-fullscreen=true")
else
winset(usr, "mainwindow", "is-fullscreen=false")
// goes into fullscreen mode without issues
// here we are forcing window to be not maximized before enabling fullscreen
tfs_w()
set name = "toggle fullscreen is-maximized=false"
var/fullscreen = winget(usr, "mainwindow", "is-fullscreen") == "true"
fullscreen = !fullscreen
if(fullscreen)
winset(usr, "mainwindow", "is-maximized=false")
winset(usr, "mainwindow", "is-fullscreen=true")
else
winset(usr, "mainwindow", "is-fullscreen=false")
winset(usr, "mainwindow", "is-maximized=true")

https://cdn.discordapp.com/attachments/725458744711839873/ 1238181343767035976/is-fullscreen.zip?ex=663e59bc&is=663d083 c&hm=5bf20e656cbc6abed4d2a2ebf20b5a067523e79a466fde61ce935ba fd4005b63

Expected Results:
Consistent behavior regardless of is-maximized state.

Actual Results:
Already described in the problem summary.

Does the problem occur:
Every time? Or how often?
Every time.

When does the problem NOT occur?
It always occurs.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Seems to be consistent across older versions.(also tested on 1636)

Workarounds:
Winsetting is-maximized to false before winsetting is-fullscreen=true

The order of operations for this has been changed in 515.1638. Please retest once that's released.
Spevacus changed status to 'Please retest'
The release of 515.1638 is out. Let me know if this is fixed and I'll add it to the release notes.
Both verbs from the test case are causing the unwanted behavior now.
I'm reverting the change for now, but in your test case I don't know which verb is supposed to do what. Can you edit that to elaborate?

Edit: A new fix is incoming in 515.1639. I think it addresses the issue.
I updated the original code snippet with some comments.
Tested on 1639. Both verbs now fullscreen properly and I'm not sure whether this is windows-related or not, but the transition into fullscreen in the tfs_b() verb behaves differently. The window looks like it bounces slightly to the bottom right before snapping into position.
Yeah, the bounce isn't something I could figure out how to fix, but I'll mark this fixed.
Lummox JR resolved issue with message:
The is-fullscreen parameter behaved incorrectly when the window was maximized beforehand.