emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 14f074f95e: Translate crossing event mode when sending them to xw


From: Po Lu
Subject: master 14f074f95e: Translate crossing event mode when sending them to xwidgets
Date: Wed, 29 Dec 2021 20:25:31 -0500 (EST)

branch: master
commit 14f074f95e2b57ddcd4b449fbdc04169290d0647
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Translate crossing event mode when sending them to xwidgets
    
    * src/xwidget.c (xi_translate_notify_detail): Use XI constants
    instead.
    (xwidget_motion_or_crossing): Translate XI entry event mode.
---
 src/xwidget.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/xwidget.c b/src/xwidget.c
index 30e9c2895d..5aeb2beae2 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -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;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]