From e38f593acdbe7f6705d052309c634bd847dc3665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 11 Jul 2020 07:39:02 +0200 Subject: [PATCH] bar/wayland: don't try to set cursor surface if serial is 0 --- bar/wayland.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bar/wayland.c b/bar/wayland.c index 13cff16..f87957a 100644 --- a/bar/wayland.c +++ b/bar/wayland.c @@ -150,8 +150,12 @@ static const struct wl_shm_listener shm_listener = { static void update_cursor_surface(struct wayland_backend *backend, struct seat *seat) { - if (seat->pointer.cursor == NULL || seat->pointer.surface == NULL) + if (seat->pointer.serial == 0 || + seat->pointer.cursor == NULL || + seat->pointer.surface == NULL) + { return; + } struct wl_cursor_image *image = seat->pointer.cursor->images[0];