[vte/vte-0-70] widget: Use correct view coordinates
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-70] widget: Use correct view coordinates
- Date: Tue, 16 Aug 2022 15:04:37 +0000 (UTC)
commit 6fa248b540c7e4f331828da3caba27eae850d101
Author: Christian Persch <chpe src gnome org>
Date: Tue Aug 16 17:03:33 2022 +0200
widget: Use correct view coordinates
The conversion needs to take the border into account.
(cherry picked from commit 1b750a348afb4085786e86fe80ac73caad1b829a)
src/vte.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 3b53ad1a..6cfe3b26 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -1791,7 +1791,8 @@ Terminal::rowcol_at(double x,
long* column,
long* row)
{
- auto rowcol = grid_coords_from_view_coords(vte::view::coords(x, y));
+ auto const vcoords = vte::view::coords(x - m_border.left, y - m_border.top);
+ auto const rowcol = grid_coords_from_view_coords(vcoords);
if (!grid_coords_visible(rowcol))
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]