aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-29 12:04:18 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-29 12:04:18 +0000
commite496d81f4d5a0432e0f12fd3494a48724f4d7d59 (patch)
treec77cd117d15e2e8b4bedbb1c87d1aec9bdb13d63
parentinput: csd: add a small delay before initiating a move (diff)
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.
-rw-r--r--input.c6
1 files 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