For each cycle the window will move up and left the same number of pixels that the size of the borders.
Repeating this and it will eventually move until you no longer can reach that button.
If the flag is assigned to a key, you can move the window as far out of the screen as you wish (at least on OS's that allow this). Apearently with not other option than to force quit the program.
Ideally I would prefer the content of the window to stay exactly at the current position, and just remove or add the border without moving the content. I made this piece of code to acheive that.
Code: Select all
borderless = GetAttribute(#DISPLAY, 0, #ATTRBORDERLESS)
If borderless
wxpos = GetAttribute(#DISPLAY, 0, #ATTRXPOS)
wypos = GetAttribute(#DISPLAY, 0, #ATTRYPOS)
SetDisplayAttributes({Borderless = False, X = wxpos, Y = wypos})
Else
wxpos = GetAttribute(#DISPLAY, 0, #ATTRXPOS)
wypos = GetAttribute(#DISPLAY, 0, #ATTRYPOS)
lbw = GetAttribute(#DISPLAY, 0, #ATTRBORDERLEFT)
tbw = GetAttribute(#DISPLAY, 0, #ATTRBORDERTOP)
SetDisplayAttributes({Borderless = True, X = wxpos+lbw, Y = wypos+tbw})
EndIf