aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-10-21 14:18:51 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-10-21 14:18:51 +0000
commitde6ab6dca07ff7e5e9324df6ddfeaa4b5ddfc51a (patch)
treedf630f42f5b5b3475fa7d4c34f7a6bdfe2d2112a
parentconfig: error out on invalid grapheme-width-method values (diff)
parentinput: update serial on each key press/release and mouse button (diff)
Merge branch 'update-input-serial-on-each-keypress'
Closes #753
-rw-r--r--CHANGELOG.md2
-rw-r--r--input.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d87b632f..d16ba08b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -61,6 +61,8 @@
* Fix crashes after enabling CSD at runtime when `csd.size` is 0.
* Convert `\r` to `\n` when reading clipboard data
(https://codeberg.org/dnkl/foot/issues/752).
+* Clipboard occasionally ceasing to work, until window has been
+ re-focused (https://codeberg.org/dnkl/foot/issues/753).
### Security
diff --git a/input.c b/input.c
index aed9675e..7ffdd91f 100644
--- a/input.c
+++ b/input.c
@@ -954,6 +954,7 @@ static void
key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
uint32_t key, uint32_t state)
{
+ seat->kbd.serial = serial;
if (seat->kbd.xkb == NULL ||
seat->kbd.xkb_keymap == NULL ||
seat->kbd.xkb_state == NULL)
@@ -1723,6 +1724,7 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
struct wayland *wayl = seat->wayl;
struct terminal *term = seat->mouse_focus;
+ seat->pointer.serial = serial;
seat->pointer.hidden = false;
xassert(term != NULL);