]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't send help-echo on menu button arming not caused by motion events
authorPo Lu <luangruo@yahoo.com>
Sun, 27 Feb 2022 11:33:16 +0000 (19:33 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 27 Feb 2022 11:33:16 +0000 (19:33 +0800)
* lwlib/lwlib-Xm.c (xm_arm_callback): Ignore arming if the arm
was not caused by an EnterNotify or MotionNotify event.

lwlib/lwlib-Xm.c

index fa60fc89d0830768457d7796b3cb66ccef7907ca..25b1cc6b121324927dc25f1787ed3a7cc8864984 100644 (file)
@@ -290,7 +290,12 @@ xm_arm_callback (Widget w, XtPointer client_data, XtPointer call_data)
   if (w != NULL)
     {
       instance = lw_get_widget_instance (w);
-      if (instance && instance->info->highlight_cb)
+
+      if (instance && instance->info->highlight_cb
+         && (cbs->reason == XmCR_DISARM
+             || (cbs->event
+                 && (cbs->event->type == EnterNotify
+                     || cbs->event->type == MotionNotify))))
        {
          call_data = cbs->reason == XmCR_DISARM ? NULL : wv;
          instance->info->highlight_cb (w, instance->info->id, call_data);