When dynamically resizing windows at runtime using the is-maximized property, you can make a window extend beyond screen boundaries just a little bit if you remove the titlebar from a window that has one by default.
There are also some oddities with titlebar UI in vista. The borders never appear for a titlebar that was added to a window while it was maximized at runtime.
Numbered steps to reproduce this problem:
1) Make an interface file.
2) Make the window minimized, and give it a title bar.
3) Anchor a label to the bottom right corner
4) Anchor a second label to the top right corner
5) Put a single output in the window.
6) Run the following code snippet.
Code Snippet (if applicable) to Reproduce Problem:
titlebar_height = 0
res_x = 800
res_y = 600
var/s = winget(src,"window1.label1","pos;")
var/s2 = winget(src,"window1.label1","size;")
var/s3 = winget(src,"window1.label1","pos;")
src.res_x = text2num(copytext(s,1,findtext(s,",",1,0))) + text2num(copytext(s2,1,findtext(s2,",",1,0)))
src.res_y = text2num(copytext(s,findtext(s,",",1,0)+1,0)) + text2num(copytext(s2,findtext(s2,",",1,0)+1,0))
src.titlebar_height = text2num(copytext(s3,findtext(s,",",1,0)+1,0))-text2num(copytext(s,findtext(s,",",1,0)+1,0))
src << output("[src.res_x],[src.res_y] [src.titlebar_height]","window1.output1")
The output should state: (with a resolution of 1280x800)
The output instead states:
When looking at a maximized window whose titlebar has been disabled, it seems to extend 3 pixels beyond the screen area on all sides. This accounts for our extra six pixels!
Does the problem occur:
Every time? Or how often? Every time with these parameters
On other computers? Yes.
In other user accounts? WTF? Yes.
When does the problem NOT occur?
When you instead add a titlebar to a window that previously did not have one.
Just found a new aspect to this bug. Apparently, giving the window a titlebar when it didn't have one before, and maximizing the window at the same time also has the same effect.
However, you can get around this by taking away the title bar immediately before you maximize the window, using two winsets instead of one.
Anchors also seem to be affected by this. If you add a window element with an anchor while there is no title bar, it will not reposition or resize properly when there is a title bar.
In general, title bars screw up positioning bad in vista.