[gtk+/wip/alexl/broadway4: 77/96] broadway: Fix input events
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/alexl/broadway4: 77/96] broadway: Fix input events
- Date: Thu, 23 Nov 2017 09:52:44 +0000 (UTC)
commit cfdb3952c6db7c8652bfeb0c65f3fa5a4cb3186f
Author: Alexander Larsson <alexl redhat com>
Date: Tue Nov 21 21:22:04 2017 +0100
broadway: Fix input events
gdk/broadway/broadway.js | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js
index 72cd91c..32406b0 100644
--- a/gdk/broadway/broadway.js
+++ b/gdk/broadway/broadway.js
@@ -582,10 +582,14 @@ function handleMessage(message)
}
function getSurfaceId(ev) {
- var surface = ev.target.surface;
- if (surface != undefined)
- return surface.id;
- return 0;
+ var target = ev.target;
+ while (target.surface == undefined) {
+ if (target == document)
+ return 0;
+ target = target.parentNode;
+ }
+
+ return target.surface.id;
}
function sendInput(cmd, args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]