mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 03:30:19 +01:00
libinput: support ignoring all libinput-based input devices by configuration
For some cases such as remote control, need to disable the interaction between input device and the weston. It will not affect the use of input device by other modules or applications. Signed-off-by: Elliot Chen <elliot.chen@nxp.com>
This commit is contained in:
parent
11f7273545
commit
bef29b8774
4 changed files with 13 additions and 0 deletions
|
|
@ -1179,6 +1179,7 @@ weston_compositor_init_config(struct weston_compositor *ec,
|
|||
int repaint_msec;
|
||||
bool color_management;
|
||||
bool cal;
|
||||
bool disable_input = false;
|
||||
|
||||
/* weston.ini [keyboard] */
|
||||
s = weston_config_get_section(config, "keyboard", NULL, NULL);
|
||||
|
|
@ -1235,6 +1236,8 @@ weston_compositor_init_config(struct weston_compositor *ec,
|
|||
if (cal)
|
||||
weston_compositor_enable_touch_calibrator(ec,
|
||||
save_touch_device_calibration);
|
||||
weston_config_section_get_bool(s, "disable-input", &disable_input, false);
|
||||
compositor->compositor->disable_input = disable_input;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1426,6 +1426,9 @@ struct weston_compositor {
|
|||
/* Whether to let the compositor run without any input device. */
|
||||
bool require_input;
|
||||
|
||||
/* Ignore all libinput-based input devices */
|
||||
bool disable_input;
|
||||
|
||||
/* Whether to load multiple backends. */
|
||||
bool multi_backend;
|
||||
|
||||
|
|
|
|||
|
|
@ -345,6 +345,10 @@ udev_input_init(struct udev_input *input, struct weston_compositor *c,
|
|||
|
||||
input->compositor = c;
|
||||
input->configure_device = configure_device;
|
||||
if (c->disable_input) {
|
||||
weston_log("Frontend disabled all input devices.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
log_priority = getenv("WESTON_LIBINPUT_LOG_PRIORITY");
|
||||
|
||||
|
|
|
|||
|
|
@ -335,6 +335,9 @@ For devices with \fBscroll-method\fR set to \fIbutton\fR. Specifies the
|
|||
button that will trigger scrolling. See /usr/include/linux/input-event-codes.h
|
||||
for the complete list of possible values.
|
||||
.TP 7
|
||||
.BI "disable-input=" false
|
||||
Ignore all libinput-based input devices.
|
||||
.TP 7
|
||||
.BI "touchscreen_calibrator=" true
|
||||
Advertise the touchscreen calibrator interface to all clients. This is a
|
||||
potential denial-of-service attack vector, so it should only be enabled on
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue