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.
This commit is contained in:
Daniel Eklöf 2020-02-29 13:04:18 +01:00
parent 43b07b122a
commit e496d81f4d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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