summaryrefslogtreecommitdiff
path: root/gdk/broadway/broadway.js
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-01-08 17:37:58 +0100
committerAlexander Larsson <alexl@redhat.com>2013-01-08 18:05:06 +0100
commit35c295da89229feb759d2c5915947379ad312d68 (patch)
tree793c9fe64ff9fd25ce4f965bd4f812fe148c2b36 /gdk/broadway/broadway.js
parent8e686357c4fc85c5662c675894ae50e6611ef7cb (diff)
downloadgtk+-35c295da89229feb759d2c5915947379ad312d68.tar.gz
broadway: Don't allow dragging windows above top of window
This is highly confusing and makes it impossible to get the windows back.
Diffstat (limited to 'gdk/broadway/broadway.js')
-rw-r--r--gdk/broadway/broadway.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js
index 8f20cce213..a53f837bd0 100644
--- a/gdk/broadway/broadway.js
+++ b/gdk/broadway/broadway.js
@@ -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);