summaryrefslogtreecommitdiff
path: root/lwlib
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-02-27 19:33:16 +0800
committerPo Lu <luangruo@yahoo.com>2022-02-27 19:33:16 +0800
commit704a40ad75fd01d7efafbb9db7b8d5ff403e44eb (patch)
treea11e5a1714147384812a05b2a273defa5e93a20b /lwlib
parente2d96ffa6a920684e67f013b5e5eae8c2379bc84 (diff)
downloademacs-704a40ad75fd01d7efafbb9db7b8d5ff403e44eb.tar.gz
Don't send help-echo on menu button arming not caused by motion events
* lwlib/lwlib-Xm.c (xm_arm_callback): Ignore arming if the arm was not caused by an EnterNotify or MotionNotify event.
Diffstat (limited to 'lwlib')
-rw-r--r--lwlib/lwlib-Xm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c
index fa60fc89d08..25b1cc6b121 100644
--- a/lwlib/lwlib-Xm.c
+++ b/lwlib/lwlib-Xm.c
@@ -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);