broadway: Don't allow dragging windows above top of window

This is highly confusing and makes it impossible to get the windows
back.
This commit is contained in:
Alexander Larsson 2013-01-08 17:37:58 +01:00
parent 8e686357c4
commit 35c295da89

View File

@ -838,6 +838,8 @@ function onMouseMove (ev) {
surface.x += dx;
surface.y += dy;
var offset = getFrameOffset(surface);
if (surface.y < offset.y)
surface.y = offset.y;
localGrab.frame.style["left"] = (surface.x - offset.x) + "px";
localGrab.frame.style["top"] = (surface.y - offset.y) + "px";
sendConfigureNotify(surface);