Translate crossing event mode when sending them to xwidgets
authorPo Lu <luangruo@yahoo.com>
Thu, 30 Dec 2021 01:24:30 +0000 (09:24 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 30 Dec 2021 01:24:30 +0000 (09:24 +0800)
* src/xwidget.c (xi_translate_notify_detail): Use XI constants
instead.
(xwidget_motion_or_crossing): Translate XI entry event mode.

src/xwidget.c

index 30e9c2895d4e918c2f920d5d7aa1268f9504100d..5aeb2beae2dced68d4305122fb58d97ad487b177 100644 (file)
@@ -1235,15 +1235,15 @@ xi_translate_notify_detail (int detail)
 {
   switch (detail)
     {
-    case NotifyInferior:
+    case XINotifyInferior:
       return GDK_NOTIFY_INFERIOR;
-    case NotifyAncestor:
+    case XINotifyAncestor:
       return GDK_NOTIFY_ANCESTOR;
-    case NotifyVirtual:
+    case XINotifyVirtual:
       return GDK_NOTIFY_VIRTUAL;
-    case NotifyNonlinear:
+    case XINotifyNonlinear:
       return GDK_NOTIFY_NONLINEAR;
-    case NotifyNonlinearVirtual:
+    case XINotifyNonlinearVirtual:
       return GDK_NOTIFY_NONLINEAR_VIRTUAL;
     default:
       emacs_abort ();
@@ -1328,6 +1328,7 @@ xwidget_motion_or_crossing (struct xwidget_view *view, const XEvent *event)
       xg_event->crossing.y_root = (gdouble) xev->root_y;
       xg_event->crossing.time = xev->time;
       xg_event->crossing.focus = xev->focus;
+      xg_event->crossing.mode = xev->mode;
       xg_event->crossing.detail = xi_translate_notify_detail (xev->detail);
       xg_event->crossing.state = xev->mods.effective;