]> Pileus Git - ~andy/gtk/blobdiff - gdk/broadway/broadway.js
broadway: Don't allow dragging windows above top of window
[~andy/gtk] / gdk / broadway / broadway.js
index 8f20cce2139b75486aa733771dee757af3c39403..a53f837bd0e8adcc147759340b087f329731accf 100644 (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);