From aac4a027eb90be9662498171e7b5bae459e25cd6 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 27 Dec 2012 20:13:41 +0100 Subject: [PATCH] broadway: Stop default mouse button handling This makes it not possible to select the canvas objects, etc. --- gdk/broadway/broadway.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js index 0a162add1f..6ad454a70b 100644 --- a/gdk/broadway/broadway.js +++ b/gdk/broadway/broadway.js @@ -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