From fdb7e403555df5fdcb7daf23f665bdec13b02500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 13 Oct 2020 08:02:09 +0200 Subject: [PATCH 1/2] =?UTF-8?q?input:=20regression:=20don=E2=80=99t=20pass?= =?UTF-8?q?=20on=20mouse=20click=20to=20application=20if=20we=20consumed?= =?UTF-8?q?=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we ‘consume’ a mouse button event (i.e. when we have a shortcut mapped to it), the event should *not* be passed on to the client application. In 5f64c5c33590a41afd3f621870c6abd89b859073, button handling was refactored and unfortunately introduced a regression where we once again started passing consumed button presses to the client application. Fixes #168 --- CHANGELOG.md | 9 +++++++++ input.c | 16 +++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7497e499..3d43150f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +* [1.5.2](#1-5-2) * [1.5.1](#1-5-1) * [1.5.0](#1-5-0) * [1.4.4](#1-4-4) @@ -14,6 +15,14 @@ * [1.2.0](#1-2-0) +## 1.5.2 + +### Fixed + +* Regression: middle clicking double pastes in e.g. vim + (https://codeberg.org/dnkl/foot/issues/168) + + ## 1.5.1 ### Changed diff --git a/input.c b/input.c index 20c1381c..160c78a7 100644 --- a/input.c +++ b/input.c @@ -1589,13 +1589,15 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, } } - if (!term_mouse_grabbed(term, seat) && - cursor_is_on_grid) - { - term_mouse_down( - term, button, seat->mouse.row, seat->mouse.col, - seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl); - } + } + + if (!seat->mouse.consumed && + !term_mouse_grabbed(term, seat) && + cursor_is_on_grid) + { + term_mouse_down( + term, button, seat->mouse.row, seat->mouse.col, + seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl); } break; } From f1e422b25ab9919512f351331dd88372b04a39fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 13 Oct 2020 08:04:37 +0200 Subject: [PATCH 2/2] meson/pkgbuild: bump version to 1.5.2 --- PKGBUILD | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index cc42ced2..bc9d6465 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,5 +1,5 @@ pkgname=('foot-git' 'foot-terminfo-git') -pkgver=1.5.1 +pkgver=1.5.2 pkgrel=1 arch=('x86_64' 'aarch64') url=https://codeberg.org/dnkl/foot diff --git a/meson.build b/meson.build index 613c388b..16a42150 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('foot', 'c', - version: '1.5.1', + version: '1.5.2', license: 'MIT', meson_version: '>=0.53.0', default_options: [