]> Pileus Git - ~andy/gtk/commitdiff
broadway: Stop default mouse button handling
authorAlexander Larsson <alexl@redhat.com>
Thu, 27 Dec 2012 19:13:41 +0000 (20:13 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 27 Dec 2012 21:56:04 +0000 (22:56 +0100)
This makes it not possible to select the canvas objects, etc.

gdk/broadway/broadway.js

index 0a162add1f512fd2f7155a59666c5ced9a97a542..6ad454a70bc6b6ceaa8d8bb7c6d519a62153491e 100644 (file)
@@ -947,7 +947,7 @@ function onMouseDown (ev) {
        localGrab.lastX = ev.pageX;
        localGrab.lastY = ev.pageY;
        moveToTop(localGrab.frame.frameFor);
-       return;
+       return false;
     }
 
     if (id == 0 && ev.target.closeFor) { /* mouse click on frame */
@@ -959,13 +959,14 @@ function onMouseDown (ev) {
        localGrab.button = ev.target;
        localGrab.lastX = ev.pageX;
        localGrab.lastY = ev.pageY;
-       return;
+       return false;
     }
 
     var pos = getPositionsFromEvent(ev, id);
     if (grab.window == null)
        doGrab (id, false, true);
     sendInput ("b", [realWindowWithMouse, id, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState, button]);
+    return false;
 }
 
 function onMouseUp (ev) {
@@ -995,13 +996,15 @@ function onMouseUp (ev) {
                sendInput ("W", [localGrab.surface.id]);
        }
        localGrab = null;
-       return;
+       return false;
     }
 
     sendInput ("B", [realWindowWithMouse, id, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState, button]);
 
     if (grab.window != null && grab.implicit)
        doUngrab();
+
+    return false;
 }
 
 /* Some of the keyboard handling code is from noVNC and