Ah! Indeed that makes sense
Ok, so what you're looking for is in GridMoveP1, lines 685-701:
If GridTop = WindowHeight
{
MonitorBottom := GetMonitorBottom(MouseX, MouseY)
GridTop := MouseY
If (GridTop + WinHeight > MonitorBottom)
GridTop := MonitorBottom - WinHeight
GridBottom := GridTop + WinHeight
}
If GridLeft = WindowWidth
{
MonitorRight := GetMonitorRight(MouseX, MouseY)
GridLeft := MouseX
If (GridLeft + WinWidth > MonitorRight)
GridLeft := MonitorRight - WinWidth
GridRight := GridLeft + WinWidth
}
And you should replace it with:
If GridTop = WindowHeight
{
MonitorBottom := GetMonitorBottom(MouseX, MouseY)
MonitorTop := GetMonitorTop(MouseX, MouseY)
GridTop := MouseY - 0.5 * WinHeight
If (GridTop + 0.5 * WinHeight > MonitorBottom)
GridTop := MonitorBottom - WinHeight
If (GridTop - 0.5 * WinHeight < MonitorTop)
GridTop := MonitorTop
GridBottom := GridTop + WinHeight
}
If GridLeft = WindowWidth
{
MonitorRight := GetMonitorRight(MouseX, MouseY)
MonitorLeft := GetMonitorLeft(MouseX, MouseY)
GridLeft := MouseX - 0.5 * WinWidth
If (GridLeft + 0.5 * WinWidth > MonitorRight)
GridLeft := MonitorRight - WinWidth
If (GridLeft - 0.5 * WinWidth < MonitorLeft)
GridLeft := MonitorLeft
GridRight := GridLeft + WinWidth
}
I'm really sorry that I can't neither test nor generate a compiled version of GridMove for you (I now only own macs, unfortunately
), but I hope this helps.