aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Olivier Fourdan <ofourdan@redhat.com>2020-03-11 15:03:03 +0100
committerLibravatar Drew DeVault <sir@cmpwn.com>2020-03-12 18:02:09 +0100
commit7dd9cd29a6cb0f075f7face47f8a0629bf13f0c6 (patch)
tree0d67adb7580c75a199683e105bed8bb18d4be405 /sway/input/seat.c
parentreadme: git is an optional dependency (diff)
downloadsway-7dd9cd29a6cb0f075f7face47f8a0629bf13f0c6.tar.gz
sway-7dd9cd29a6cb0f075f7face47f8a0629bf13f0c6.tar.zst
sway-7dd9cd29a6cb0f075f7face47f8a0629bf13f0c6.zip
input: Avoid creating the PAD device multiple times
If a pad device for a tablet exists, reloading the configuration, removing/reading the device or even suspending the system will recreate the same Wayland input device multiple times. Make sure we don't re-create the same Wayland device more than necessary. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 6739c163..920742e9 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -723,7 +723,7 @@ static void seat_configure_tablet_tool(struct sway_seat *seat,
723 723
724static void seat_configure_tablet_pad(struct sway_seat *seat, 724static void seat_configure_tablet_pad(struct sway_seat *seat,
725 struct sway_seat_device *sway_device) { 725 struct sway_seat_device *sway_device) {
726 if (!sway_device->tablet) { 726 if (!sway_device->tablet_pad) {
727 sway_device->tablet_pad = sway_tablet_pad_create(seat, sway_device); 727 sway_device->tablet_pad = sway_tablet_pad_create(seat, sway_device);
728 } 728 }
729 sway_configure_tablet_pad(sway_device->tablet_pad); 729 sway_configure_tablet_pad(sway_device->tablet_pad);