summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch')
-rw-r--r--meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch112
1 files changed, 0 insertions, 112 deletions
diff --git a/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch b/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
deleted file mode 100644
index c45f3addfc..0000000000
--- a/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
+++ /dev/null
@@ -1,112 +0,0 @@
1From 75b7197f4e072a4e2de124ddbe93b85cffb1c0f8 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
9As it has been discussed in the past [1], running Weston
10without any input device at launch might be beneficial for
11some use cases.
12
13Certainly, it's best for the vast majority of users (and
14the project) to require an input device to be present, as
15to avoid frustration and hassle, but for those brave souls
16that so prefer, this patch lets them run without any input
17device at all.
18
19This introduces a simple configuration in weston.ini:
20 [core]
21 require-input=true
22
23True is the default, so no behavioral change is introduced.
24
25[1] https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html
26
27Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
28Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
29Reviewed-by: Daniel Stone <daniels@collabora.com>
30
31Upstream-Status: backport from
32https://cgit.freedesktop.org/wayland/weston/commit/?id=75b7197f
33---
34 man/weston.ini.man | 5 +++++
35 src/compositor.h | 3 +++
36 src/libinput-seat.c | 6 ++++++
37 src/main.c | 5 +++++
38 weston.ini.in | 1 +
39 5 files changed, 20 insertions(+)
40
41--- a/src/main.c
42+++ b/src/main.c
43@@ -1298,6 +1298,7 @@ int main(int argc, char *argv[])
44 struct wl_client *primary_client;
45 struct wl_listener primary_client_destroyed;
46 struct weston_seat *seat;
47+ int require_input;
48
49 const struct weston_option core_options[] = {
50 { WESTON_OPTION_STRING, "backend", 'B', &backend },
51@@ -1373,6 +1374,10 @@ int main(int argc, char *argv[])
52 if (weston_compositor_init_config(ec, config) < 0)
53 goto out;
54
55+ weston_config_section_get_bool(section, "require-input",
56+ &require_input, true);
57+ ec->require_input = require_input;
58+
59 if (load_backend(ec, backend, &argc, argv, config) < 0) {
60 weston_log("fatal: failed to create compositor backend\n");
61 goto out;
62--- a/src/compositor.h
63+++ b/src/compositor.h
64@@ -803,6 +803,9 @@ struct weston_compositor {
65
66 void *user_data;
67 void (*exit)(struct weston_compositor *c);
68+
69+ /* Whether to let the compositor run without any input device. */
70+ bool require_input;
71 };
72
73 struct weston_buffer {
74--- a/src/libinput-seat.c
75+++ b/src/libinput-seat.c
76@@ -255,6 +255,12 @@ udev_input_enable(struct udev_input *inp
77 devices_found = 1;
78 }
79
80+ if (devices_found == 0 && !c->require_input) {
81+ weston_log("warning: no input devices found, but none required "
82+ "as per configuration.\n");
83+ return 0;
84+ }
85+
86 if (devices_found == 0) {
87 weston_log(
88 "warning: no input devices on entering Weston. "
89--- a/man/weston.ini.man
90+++ b/man/weston.ini.man
91@@ -169,6 +169,11 @@ time, the one specified in the command-l
92 hand, if none of these sets the value, default idle timeout will be
93 set to 300 seconds.
94 .RS
95+.PP
96+.RE
97+.TP 7
98+.BI "require-input=" true
99+require an input device for launch
100
101 .SH "LIBINPUT SECTION"
102 The
103--- a/weston.ini.in
104+++ b/weston.ini.in
105@@ -2,6 +2,7 @@
106 #modules=xwayland.so,cms-colord.so
107 #shell=desktop-shell.so
108 #gbm-format=xrgb2101010
109+#require-input=true
110
111 [shell]
112 background-image=/usr/share/backgrounds/gnome/Aqua.jpg