From e496d81f4d5a0432e0f12fd3494a48724f4d7d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 29 Feb 2020 13:04:18 +0100 Subject: [PATCH] input: don't update xcursor on keyboard enter/leave I'm not sure why I added this in the first place... our cursor doesn't depend on keyboard focus. Furthermore, with CSDs, we may get keyboard enter events for the CSD surfaces, and these should definitely *not* update the xcursor as if it was inside the main surface. --- input.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/input.c b/input.c index 1db3541f..91b49460 100644 --- a/input.c +++ b/input.c @@ -96,7 +96,6 @@ keyboard_enter(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, wayl->input_serial = serial; term_kbd_focus_in(wayl->kbd_focus); - term_xcursor_update(wayl->kbd_focus); } static bool @@ -163,10 +162,9 @@ keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, wayl->kbd.meta = false;; xkb_compose_state_reset(wayl->kbd.xkb_compose_state); - if (old_focused != NULL) { + if (old_focused != NULL) term_kbd_focus_out(old_focused); - term_xcursor_update(old_focused); - } else { + else { /* * Sway bug - under certain conditions we get a * keyboard_leave() (and keyboard_key()) without first having