#ifdef HAVE_XINPUT2
prepare_for_entry_into_toolkit_menu (f);
+
+#ifdef USE_LUCID
+ if (dpyinfo->supports_xi2)
+ x_mouse_leave (dpyinfo);
+#endif
#endif
/* Display the menu. */
lw_popup_menu (menu, &dummy);
}
-#if !defined USE_X_TOOLKIT && !defined USE_GTK
+#if (defined USE_LUCID && defined HAVE_XINPUT2) \
+ || (!defined USE_X_TOOLKIT && !defined USE_GTK)
/* Handle an event saying the mouse has moved out of an Emacs frame. */
void
x_mouse_leave (struct x_display_info *dpyinfo)
{
+ Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
+
+ if (hlinfo->mouse_face_mouse_frame)
+ {
+ clear_mouse_face (hlinfo);
+ hlinfo->mouse_face_mouse_frame = NULL;
+ }
+
x_new_focus_frame (dpyinfo, dpyinfo->x_focus_event_frame);
}
#endif
extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
extern void x_query_colors (struct frame *f, XColor *, int);
extern void x_clear_area (struct frame *f, int, int, int, int);
-#if !defined USE_X_TOOLKIT && !defined USE_GTK
+#if (defined USE_LUCID && defined HAVE_XINPUT2) \
+ || (!defined USE_X_TOOLKIT && !defined USE_GTK)
extern void x_mouse_leave (struct x_display_info *);
#endif