+2007-01-01 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
+
+ * xlwmenu.c (xlwMenuResources): Add XtNleaveCallback, XtNenterCallback.
+ (display_menu, map_event_to_widget_value): Generate enter and
+ leave callbacks.
+ (pop_up_menu): Initialize mw->menu.inside_entry.
+
+ * xlwmenu.h (XtNleaveCallback, XtNenterCallback): New strings.
+
+ * xlwmenuP.h (_XlwMenu_part): Add enter/leave callbacks and
+ inside_entry.
+
+ * lwlib-Xlw.c (enter_hook, leave_hook): New functions
+ (xlw_create_menubar, xlw_create_popup_menu): Connect XtNenter/leave
+ to enter/leave_hook.
+
2006-10-30 Chong Yidong <cyd@stupidchicken.com>
* Makefile.in (lwlib-utils.o): Use CPPFLAGS.
instance->info->highlight_cb (w, instance->info->id, call_data);
}
+static void
+enter_hook (w, client_data, call_data)
+ Widget w;
+ XtPointer client_data;
+ XtPointer call_data;
+{
+ highlight_hook (w, client_data, call_data);
+}
+
+static void
+leave_hook (w, client_data, call_data)
+ Widget w;
+ XtPointer client_data;
+ XtPointer call_data;
+{
+ highlight_hook (w, client_data, NULL);
+}
+
+
static void
pre_hook (w, client_data, call_data)
Widget w;
XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance);
XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
- XtAddCallback (widget, XtNhighlightCallback, highlight_hook,
- (XtPointer)instance);
+ XtAddCallback (widget, XtNleaveCallback, leave_hook, (XtPointer)instance);
+ XtAddCallback (widget, XtNenterCallback, enter_hook, (XtPointer)instance);
return widget;
}
popup_shell, al, ac);
XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
- XtAddCallback (widget, XtNhighlightCallback, highlight_hook,
- (XtPointer)instance);
+ XtAddCallback (widget, XtNleaveCallback, leave_hook, (XtPointer)instance);
+ XtAddCallback (widget, XtNenterCallback, enter_hook, (XtPointer)instance);
return popup_shell;
}