1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
Subject: [PATCH] Add the processing which has notice of click event from compositor
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>
---
ivi-shell/ivi-shell.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index 2f2e4fa..933e878 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -36,6 +36,7 @@
#include <dlfcn.h>
#include <limits.h>
#include <assert.h>
+#include <linux/input.h>
#include "ivi-shell.h"
#include "ivi-application-server-protocol.h"
@@ -385,6 +386,21 @@
return result;
}
+static void
+click_to_activate_binding(struct weston_seat *seat,
+ uint32_t time, uint32_t button,
+ void *data)
+{
+ if (seat->pointer->grab != &seat->pointer->default_grab) {
+ return;
+ }
+ if (seat->pointer->focus == NULL) {
+ return;
+ }
+
+ weston_surface_activate(seat->pointer->focus->surface, seat);
+}
+
/*
* Initialization of ivi-shell.
*/
@@ -424,6 +440,8 @@
return -1;
}
+ weston_compositor_add_button_binding(compositor, BTN_LEFT, 0, click_to_activate_binding, shell);
+
free(setting.ivi_module);
return 0;
}
1.7.11.7
BR,
Nobuhiko Tanibata
|