mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
* XMenu.h (XMenuActivateSetWaitFunction): New function.
* Activate.c (XMenuActivateSetWaitFunction): New function. (XMenuActivate): Call wait_func if set, before XNextEvent.
This commit is contained in:
parent
036cf769ad
commit
141dbd2b16
3 changed files with 25 additions and 0 deletions
|
|
@ -85,6 +85,20 @@
|
||||||
/* For debug, set this to 0 to not grab the keyboard on menu popup */
|
/* For debug, set this to 0 to not grab the keyboard on menu popup */
|
||||||
int x_menu_grab_keyboard = 1;
|
int x_menu_grab_keyboard = 1;
|
||||||
|
|
||||||
|
typedef void (*Wait_func)();
|
||||||
|
|
||||||
|
static Wait_func wait_func;
|
||||||
|
static void* wait_data;
|
||||||
|
|
||||||
|
void
|
||||||
|
XMenuActivateSetWaitFunction (func, data)
|
||||||
|
Wait_func func;
|
||||||
|
void *data;
|
||||||
|
{
|
||||||
|
wait_func = func;
|
||||||
|
wait_data = data;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data,
|
XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data,
|
||||||
help_callback)
|
help_callback)
|
||||||
|
|
@ -266,6 +280,7 @@ XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data,
|
||||||
* Begin event processing loop.
|
* Begin event processing loop.
|
||||||
*/
|
*/
|
||||||
while (1) {
|
while (1) {
|
||||||
|
if (wait_func) (*wait_func) (wait_data);
|
||||||
XNextEvent(display, &event); /* Get next event. */
|
XNextEvent(display, &event); /* Get next event. */
|
||||||
switch (event.type) { /* Dispatch on the event type. */
|
switch (event.type) { /* Dispatch on the event type. */
|
||||||
case Expose:
|
case Expose:
|
||||||
|
|
@ -557,6 +572,8 @@ XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data,
|
||||||
free((char *)feq_tmp);
|
free((char *)feq_tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wait_func = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return successfully.
|
* Return successfully.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,10 @@
|
||||||
|
2004-11-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||||
|
|
||||||
|
* XMenu.h (XMenuActivateSetWaitFunction): New function.
|
||||||
|
|
||||||
|
* Activate.c (XMenuActivateSetWaitFunction): New function.
|
||||||
|
(XMenuActivate): Call wait_func if set, before XNextEvent.
|
||||||
|
|
||||||
2002-04-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
2002-04-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||||
|
|
||||||
* Activate.c: Add calls to GrabKeyboard to remove strange
|
* Activate.c: Add calls to GrabKeyboard to remove strange
|
||||||
|
|
|
||||||
|
|
@ -251,6 +251,7 @@ int XMenuRecompute();
|
||||||
int XMenuEventHandler(); /* No value actually returned. */
|
int XMenuEventHandler(); /* No value actually returned. */
|
||||||
int XMenuLocate();
|
int XMenuLocate();
|
||||||
int XMenuSetFreeze(); /* No value actually returned. */
|
int XMenuSetFreeze(); /* No value actually returned. */
|
||||||
|
void XMenuActivateSetWaitFunction();
|
||||||
int XMenuActivate();
|
int XMenuActivate();
|
||||||
char *XMenuPost();
|
char *XMenuPost();
|
||||||
int XMenuDeletePane();
|
int XMenuDeletePane();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue