static Wait_func wait_func;
static void* wait_data;
static Translate_func translate_func = NULL;
-static Expose_func expose_func = NULL;
void
XMenuActivateSetWaitFunction (Wait_func func, void *data)
translate_func = func;
}
-void
-XMenuActivateSetExposeFunction (Expose_func func)
-{
- expose_func = func;
-}
-
int
XMenuActivate(
register Display *display, /* Display to put menu on. */
feq = feq_tmp;
}
else if (_XMEventHandler) (*_XMEventHandler)(&event);
-
- if (expose_func)
- expose_func (&event);
break;
}
if (event_xmp->activated) {
XPutBackEvent on an equivalent artificial core event on any
function it wants to translate. */
typedef void (*Translate_func)(XEvent *);
-typedef void (*Expose_func)(XEvent *);
/*
* XMenu library routine declarations.
void XMenuSetFreeze(XMenu *menu, int freeze);
void XMenuActivateSetWaitFunction(Wait_func func, void *data);
void XMenuActivateSetTranslateFunction(Translate_func func);
-void XMenuActivateSetExposeFunction(Expose_func func);
int XMenuActivate(Display *display, XMenu *menu, int *p_num, int *s_num, int x_pos, int y_pos, unsigned int event_mask, char **data, void (*help_callback) (char const *, int, int));
char *XMenuPost(Display *display, XMenu *menu, int *p_num, int *s_num, int x_pos, int y_pos, int event_mask);
int XMenuDeletePane(Display *display, XMenu *menu, int p_num);
#define XGetGeometry(p1,p2,p3,p4,p5,p6,p7,p8,p9)
#define DisplayWidth(p1,p2) (SELECTED_FRAME()->text_cols)
#define DisplayHeight(p1,p2) (SELECTED_FRAME()->text_lines)
-#define XMenuSetAEQ (void)
#define XMenuSetFreeze (void)
#define XMenuRecompute (void)
#define XM_FAILURE -1
#endif
#if !defined USE_X_TOOLKIT && !defined USE_GTK
-static void
-x_menu_expose_event (XEvent *event)
+static int
+x_menu_dispatch_event (XEvent *event)
{
x_dispatch_event (event, event->xexpose.display);
+
+ /* The return doesn't really matter. */
+ return 0;
}
#endif
#endif /* ! MSDOS */
y += 1.5 * height/ (maxlines + 2);
}
- XMenuSetAEQ (menu, true);
XMenuSetFreeze (menu, true);
pane = selidx = 0;
#ifndef MSDOS
DEFER_SELECTIONS;
- XMenuActivateSetWaitFunction (x_menu_wait_for_event, FRAME_X_DISPLAY (f));
+ XMenuActivateSetWaitFunction (x_menu_wait_for_event,
+ FRAME_X_DISPLAY (f));
+ XMenuEventHandler (x_menu_dispatch_event);
+
/* When the input extension is in use, the owner_events grab will
report extension events on frames, which the XMenu library does
not normally understand. */
#ifdef HAVE_XINPUT2
XMenuActivateSetTranslateFunction (x_menu_translate_generic_event);
#endif
- XMenuActivateSetExposeFunction (x_menu_expose_event);
#endif
record_unwind_protect_ptr (pop_down_menu,