summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-01-12 20:13:28 +0800
committerPo Lu <luangruo@yahoo.com>2022-01-12 20:13:28 +0800
commit492bf1e06edb4324a643ccb15dd6062762145f17 (patch)
treeeae22a230be8df2b2ef3da1a5739e8847613c374
parentaa685a465b4c347194efd5948563eaa01d0dcce6 (diff)
downloademacs-492bf1e06edb4324a643ccb15dd6062762145f17.tar.gz
Use correct coordinates when translating XI2 crossing events
* src/xwidget.c (xwidget_motion_or_crossing): Use displaced position instead of event position.
-rw-r--r--src/xwidget.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xwidget.c b/src/xwidget.c
index 7d6d256a191..45879b15cbe 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -1447,8 +1447,8 @@ xwidget_motion_or_crossing (struct xwidget_view *view, const XEvent *event)
#ifdef HAVE_XINPUT2
else if (event->type == GenericEvent)
{
- xg_event->crossing.x = (gdouble) xev->event_x;
- xg_event->crossing.y = (gdouble) xev->event_y;
+ xg_event->crossing.x = x;
+ xg_event->crossing.y = y;
xg_event->crossing.x_root = (gdouble) xev->root_x;
xg_event->crossing.y_root = (gdouble) xev->root_y;
xg_event->crossing.time = xev->time;