diff --git a/src/main/scala/ocelot/desktop/windows/ScreenWindow.scala b/src/main/scala/ocelot/desktop/windows/ScreenWindow.scala index 2825c52..22d5e91 100644 --- a/src/main/scala/ocelot/desktop/windows/ScreenWindow.scala +++ b/src/main/scala/ocelot/desktop/windows/ScreenWindow.scala @@ -128,12 +128,12 @@ class ScreenWindow(screenNode: ScreenNode) extends PanelWindow with Logging { } override protected def dragRegions: Iterator[Rect2D] = Iterator( - Rect2D(position.x, position.y, size.width, BorderTop.toFloat), - Rect2D(position.x, position.y, BorderLeft.toFloat, size.height), + Rect2D(position.x, position.y, size.width, View.position.y - position.y), + Rect2D(position.x, position.y, View.position.x - position.x, size.height), // these two must not include `scaleDragRegion` - Rect2D(position.x, position.y + size.height - BorderBottom, size.width - BorderRight, BorderBottom.toFloat), - Rect2D(position.x + size.width - BorderRight, position.y, BorderRight.toFloat, size.height - BorderBottom), + Rect2D(position.x, View.bounds.max.y, size.width - BorderRight, bounds.max.y - View.bounds.max.y), + Rect2D(View.bounds.max.x, position.y, bounds.max.y - View.bounds.max.y, size.height - BorderBottom), ) private def scaleDragRegion: Rect2D = Rect2D(