ID:823222
 
Not a bug
BYOND Version:495
Operating System:Windows Vista Home Premium 64-bit
Web Browser:Internet Explorer 9.0
Applies to:Dream Maker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Well, I tried to make a verb switch to toggle between windowed mode and full screen, when I discovered what I strongly believe is a bug with the can-resize parameter of the winset() proc.

Here's what happened:
I made full screen get toggled on upon Login().
Now, when I went in and actually unchecked the resize checkbox with the skin editor, resizing became disabled and full screen was on as soon as I ran it, just as I would expect, but when I toggled full screen off, then back on (resizing gets disabled when full screen), the window didn't behave right at all. It ended up shifted a few pixels off-screen towards the upper-left, and the Windows taskbar didn't get hidden for some reason.

I know that this is caused by can-resize because if I make it not turn on upon switching to windowed mode, then there is no window alignment issue and the Windows taskbar hides as it should. However, I need resizing to be re-enabled when windowed mode is on, because it just doesn't act normal without it (obviously). I should also mention that I had to try disabling can-resize to begin with, because that same window alignment issue always happens when full screen is on at the same time.

This is a very annoying bug. From what I know, 2 things seem to be happening that shouldn't:
1. When both resizing and full screen mode are enabled, the window becomes misaligned.
2. The winset() proc is failing to set the can-resize parameter as false.

I didn't test this using the list2params() proc, so I don't know if the results might be different in that case.

Finally, here is the code for the full screen verb switch that I came up with. To try and reproduce it, there will need to be a DMF interface file with can-resize initially set to false. You will of course also need to display the verbs in the interface, in order to toggle them.
mob
Login()
Display_Full_Screen()
..()

verb/Display_Window()
winset(src, "default", "titlebar=true;can-resize=true")
verbs += /mob/proc/Display_Full_Screen
verbs -= /mob/verb/Display_Window

proc/Display_Full_Screen()
winset(src, "default", "titlebar=false;statusbar=false;can-resize=false;is-maximized=true")
verbs += /mob/verb/Display_Window
verbs -= /mob/proc/Display_Full_Screen


I'm sure the toggle would have worked great if it wasn't for this silly bug.
I sure hope it gets fixed!
Let me know if you are able to reproduce the problem.
Alright, I was notified of the existence of a related bug. Apparently, you have to use individual winset() calls in order for full screen to work properly.

However, after testing that, I found out this will not work by itself:
mob
Login()
Display_Full_Screen()
..()

verb/Display_Window()
winset(src, "default", "titlebar=true")
winset(src, "default", "can-resize=true")
verbs += /mob/proc/Display_Full_Screen
verbs -= /mob/verb/Display_Window

proc/Display_Full_Screen()
winset(src, "default", "titlebar=false")
winset(src, "default", "statusbar=false")
winset(src, "default", "can-resize=false")
winset(src, "default", "is-maximized=true")
verbs += /mob/verb/Display_Window
verbs -= /mob/proc/Display_Full_Screen


The reason for it has to do with the Windows taskbar covering bug, which this is all based around. For some reason, the window must be restored down first, or else it just won't go full screen.

We can fix that by simply setting setting is-maximized to false, before we set it to true. It happens so fast that you don't really notice it.

This method is working:
mob
Login()
Display_Full_Screen()
..()

verb/Display_Window()
winset(src, "default", "titlebar=true")
winset(src, "default", "can-resize=true")
verbs += /mob/proc/Display_Full_Screen
verbs -= /mob/verb/Display_Window

proc/Display_Full_Screen()
winset(src, "default", "titlebar=false")
winset(src, "default", "statusbar=false")
winset(src, "default", "can-resize=false")
winset(src, "default", "is-maximized=false") //This needs to be added first.
winset(src, "default", "is-maximized=true")
verbs += /mob/verb/Display_Window
verbs -= /mob/proc/Display_Full_Screen


I suppose that since this whole thing is actually based around a bug, I can't really expect it to get "fixed". I'm still not sure that there isn't a bug involving the can-resize parameter though. I'm guessing that ultimately a real full screen will need to be implemented before the bugs involving winset() get fixed completely, but it's probably not a priority.
Inasmuch as the issue exists because of a separate bug, and you have a workaround, I'll close this report as a non-bug.
Lummox JR resolved issue (Not a bug)