mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-27 19:38:15 +02:00
libinput: make setting the same output a no-op
In the future evdev_device_set_output() will start getting called more often, redundantly. Short-circuit the setting if the chosen output is already set for an input device. This reduces churn in the logs. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
6632b6dc72
commit
018e6ade21
1 changed files with 3 additions and 0 deletions
|
|
@ -549,6 +549,9 @@ void
|
|||
evdev_device_set_output(struct evdev_device *device,
|
||||
struct weston_output *output)
|
||||
{
|
||||
if (device->output == output)
|
||||
return;
|
||||
|
||||
if (device->output_destroy_listener.notify) {
|
||||
wl_list_remove(&device->output_destroy_listener.link);
|
||||
device->output_destroy_listener.notify = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue