[gtk+] [broadway] Cancel key events after seeing them



commit 85c1c22d04d369529ec4c3b6f608270f4f394cb5
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Apr 12 13:38:04 2011 +0200

    [broadway] Cancel key events after seeing them

 gdk/broadway/broadway.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js
index 82c7ac4..f8ad88e 100644
--- a/gdk/broadway/broadway.js
+++ b/gdk/broadway/broadway.js
@@ -1098,21 +1098,23 @@ var lastKeyDown = 0;
 function onKeyDown (ev) {
     updateForEvent(ev);
     if (localGrab)
-	return;
+	return cancelEvent(ev);
     var keyCode = ev.keyCode;
     if (keyCode != lastKeyDown) {
 	sendInput ("k", [keyCode]);
 	lastKeyDown = keyCode;
     }
+    return cancelEvent(ev);
 }
 
 function onKeyUp (ev) {
     updateForEvent(ev);
     if (localGrab)
-	return;
+	return cancelEvent(ev);
     var keyCode = ev.keyCode;
     sendInput ("K", [keyCode]);
     lastKeyDown = 0;
+    return cancelEvent(ev);
 }
 
 function cancelEvent(ev)



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