[vte] widget: Use correct view coordinates
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: Use correct view coordinates
- Date: Tue, 16 Aug 2022 15:04:25 +0000 (UTC)
commit 1b750a348afb4085786e86fe80ac73caad1b829a
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.
src/vte.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 82613608..16121f15 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]