From 8ab4d9138054c6e4b003c9a89db65aae29a28bdb Mon Sep 17 00:00:00 2001 From: Kalyan Sriram Date: Thu, 28 May 2020 22:32:03 -0700 Subject: [PATCH] Don't send redundant capability updates --- types/seat/wlr_seat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c index 33db5101..9395a5b1 100644 --- a/types/seat/wlr_seat.c +++ b/types/seat/wlr_seat.c @@ -310,6 +310,11 @@ struct wlr_seat_client *wlr_seat_client_for_wl_client(struct wlr_seat *wlr_seat, void wlr_seat_set_capabilities(struct wlr_seat *wlr_seat, uint32_t capabilities) { + // if the capabilities haven't changed (i.e a redundant mouse was removed), + // we don't actually have to do anything + if (capabilities == wlr_seat->capabilities) { + return; + } wlr_seat->capabilities = capabilities; wlr_seat->accumulated_capabilities |= capabilities;