08-06-2015, 03:43 AM
I've been doing much the same thing: if the window is not going to be displayed properly, restore it to a default position, Useful if your user has changed to a lower screen resolution. But an alternative is to take it down in steps.
while(x> peek("desktopwidth")-500))
x = x-20
wend
20 pixels is roughly the height of the Haiku window tab, so when you run this routine on y you don't end up with a window that has its tab sticking up above the top of the screen.
while(x> peek("desktopwidth")-500))
x = x-20
wend
20 pixels is roughly the height of the Haiku window tab, so when you run this routine on y you don't end up with a window that has its tab sticking up above the top of the screen.