[gtk+] broadway: Don't allow dragging windows above top of window



commit 35c295da89229feb759d2c5915947379ad312d68
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Jan 8 17:37:58 2013 +0100

    broadway: Don't allow dragging windows above top of window
    
    This is highly confusing and makes it impossible to get the windows
    back.

 gdk/broadway/broadway.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js
index 8f20cce..a53f837 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]