(It is also not possible to get the exterior dimensions of the window at all, maximized or not, but that would be better suited for a feature request.)
Numbered Steps to Reproduce Problem:
1) Create a skin file.
2) Create a window in that skin file with dimensions of your choice.
3) Create a verb which returns the 'size' parameter of the window.
4) Run the program.
5) Use the verb. The verb will report the correct dimensions in the output.
6) Resize the window.
7) Use the verb. The verb will still report the correct, new dimensions.
8) Maximize the window using the button on the titlebar (standard Windows API).
9) Use the verb again. The verb will report the same dimensions as previously, rather than the internal screen dimensions of the maximized window.
Code Snippet (if applicable) to Reproduce Problem:
mob
verb
get_window_size()
var/window_size = winget(src,"default","size")
var/size_x = text2num(copytext(window_size,1,"x"))
var/size_y = text2num(copytext(window_size,findtext(window_size,"x")+1))
src << "Window size [size_x],[size_y]"
Expected Results:
After being maximized, the 'size' parameter of the window should still report the existing interior dimension of the window, excluding the title bar, the status bar, the border, etc.
Actual Results:
The 'size' parameter reports the last known size of the window before it was maximized. This may be a deliberate feature, so when the window is "restored" to its previous size it will retain the same dimensions, but is unintuitive from a design standpoint.
If the actual size of the window could be retained in an internal BYOND variable while the 'size' parameter would then reflect the size of the window after maximizing, it would satisfy the best of both worlds. Restoring the window would result in checking the stored parameter and resetting the size parameter to that value.
Workarounds:
The only viable workaround is to introduce a function which disables the titlebar, statusbar, etc. and forces the screen to a user-specified screen dimension. The game can then accommodate the exact dimensions as necessary. However, this is not very user-friendly and completely ignores the intuitive option of using the maximize feature of the window.