summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2016-11-24 16:09:31 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 17:21:41 +0000
commita4c7f45b8bfbc182ec94847d5184b776d13ac7de (patch)
tree8aa7b39284bf929f021423bce36004dea7f7137a /meta/recipes-graphics/wayland
parent6b736febdcf81ca06b9413184ca828c4dd477561 (diff)
downloadpoky-a4c7f45b8bfbc182ec94847d5184b776d13ac7de.tar.gz
weston: Add no-input-device patch to 1.11.0.
The included patch, backported from Weston master (and OE-Core master since Weston 1.11.1, b6864b1), allows it to run without any input device at launch. An ini option is introduced for this purpose, so there is no behavioral change. Related change in weston.ini: [core] require-input=true Default is true; setting it false allows Weston to run without a keyboard or mouse, which is handy for automated environments. (From OE-Core rev: 8fa5e442d16b1d04066b51b9fd56be41ae67d2d5) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/wayland')
-rw-r--r--meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch123
-rw-r--r--meta/recipes-graphics/wayland/weston_1.11.0.bb1
2 files changed, 124 insertions, 0 deletions
diff --git a/meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch b/meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch
new file mode 100644
index 0000000000..6f5ad6652a
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch
@@ -0,0 +1,123 @@
1From bbf2e6ebbd9c051775f43e1e3c3a2f41322342e8 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
3Date: Fri, 21 Oct 2016 14:03:13 -0500
4Subject: [PATCH] Add configuration option for no input device.
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9[Backported from master, 75b7197.]
10
11As it has been discussed in the past [1], running Weston
12without any input device at launch might be beneficial for
13some use cases.
14
15Certainly, it's best for the vast majority of users (and
16the project) to require an input device to be present, as
17to avoid frustration and hassle, but for those brave souls
18that so prefer, this patch lets them run without any input
19device at all.
20
21This introduces a simple configuration in weston.ini:
22 [core]
23 require-input=true
24
25True is the default, so no behavioral change is introduced.
26
27[1] https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html
28
29Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
30---
31 man/weston.ini.man | 5 +++++
32 src/compositor.h | 4 ++++
33 src/libinput-seat.c | 6 ++++++
34 src/main.c | 5 +++++
35 weston.ini.in | 1 +
36 5 files changed, 21 insertions(+)
37
38diff --git a/man/weston.ini.man b/man/weston.ini.man
39index d7c4a6f..c7d0f01 100644
40--- a/man/weston.ini.man
41+++ b/man/weston.ini.man
42@@ -169,6 +169,11 @@ time, the one specified in the command-line will be used. On the other
43 hand, if none of these sets the value, default idle timeout will be
44 set to 300 seconds.
45 .RS
46+.PP
47+.RE
48+.TP 7
49+.BI "require-input=" true
50+require an input device for launch
51
52 .SH "LIBINPUT SECTION"
53 The
54diff --git a/src/compositor.h b/src/compositor.h
55index 0bbf458..476b650 100644
56--- a/src/compositor.h
57+++ b/src/compositor.h
58@@ -803,6 +803,10 @@ struct weston_compositor {
59
60 void *user_data;
61 void (*exit)(struct weston_compositor *c);
62+
63+ /* Whether to let the compositor run without any input device. */
64+ bool require_input;
65+
66 };
67
68 struct weston_buffer {
69diff --git a/src/libinput-seat.c b/src/libinput-seat.c
70index 8ce0ee0..e1fdcf0 100644
71--- a/src/libinput-seat.c
72+++ b/src/libinput-seat.c
73@@ -255,6 +255,12 @@ udev_input_enable(struct udev_input *input)
74 devices_found = 1;
75 }
76
77+ if (devices_found == 0 && !c->require_input) {
78+ weston_log("warning: no input devices found, but none required "
79+ "as per configuration.\n");
80+ return 0;
81+ }
82+
83 if (devices_found == 0) {
84 weston_log(
85 "warning: no input devices on entering Weston. "
86diff --git a/src/main.c b/src/main.c
87index 3279ac6..09905ea 100644
88--- a/src/main.c
89+++ b/src/main.c
90@@ -1298,6 +1298,7 @@ int main(int argc, char *argv[])
91 struct wl_client *primary_client;
92 struct wl_listener primary_client_destroyed;
93 struct weston_seat *seat;
94+ int require_input;
95
96 const struct weston_option core_options[] = {
97 { WESTON_OPTION_STRING, "backend", 'B', &backend },
98@@ -1373,6 +1374,10 @@ int main(int argc, char *argv[])
99 if (weston_compositor_init_config(ec, config) < 0)
100 goto out;
101
102+ weston_config_section_get_bool(section, "require-input",
103+ &require_input, true);
104+ ec->require_input = require_input;
105+
106 if (load_backend(ec, backend, &argc, argv, config) < 0) {
107 weston_log("fatal: failed to create compositor backend\n");
108 goto out;
109diff --git a/weston.ini.in b/weston.ini.in
110index 14a4c0c..d837fb5 100644
111--- a/weston.ini.in
112+++ b/weston.ini.in
113@@ -2,6 +2,7 @@
114 #modules=xwayland.so,cms-colord.so
115 #shell=desktop-shell.so
116 #gbm-format=xrgb2101010
117+#require-input=true
118
119 [shell]
120 background-image=/usr/share/backgrounds/gnome/Aqua.jpg
121--
1221.9.1
123
diff --git a/meta/recipes-graphics/wayland/weston_1.11.0.bb b/meta/recipes-graphics/wayland/weston_1.11.0.bb
index 3ad309dab6..9740ce9c9e 100644
--- a/meta/recipes-graphics/wayland/weston_1.11.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.11.0.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
14 file://xwayland.weston-start \ 14 file://xwayland.weston-start \
15 file://make-weston-launch-exit-for-unrecognized-option.patch \ 15 file://make-weston-launch-exit-for-unrecognized-option.patch \
16 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ 16 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
17 file://weston-1.11-config-option-for-no-input-device.patch \
17" 18"
18SRC_URI[md5sum] = "bc6f90a2039163804aecfa663b69c4c2" 19SRC_URI[md5sum] = "bc6f90a2039163804aecfa663b69c4c2"
19SRC_URI[sha256sum] = "05e086e9f186a06843b9f7a5e1abf19347b1a6e4be26d7e74927abc17b6b7125" 20SRC_URI[sha256sum] = "05e086e9f186a06843b9f7a5e1abf19347b1a6e4be26d7e74927abc17b6b7125"