diff options
Diffstat (limited to 'oldXMenu/Activate.c')
| -rw-r--r-- | oldXMenu/Activate.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/oldXMenu/Activate.c b/oldXMenu/Activate.c index 840c423471b..363b225a355 100644 --- a/oldXMenu/Activate.c +++ b/oldXMenu/Activate.c | |||
| @@ -85,6 +85,20 @@ | |||
| 85 | /* For debug, set this to 0 to not grab the keyboard on menu popup */ | 85 | /* For debug, set this to 0 to not grab the keyboard on menu popup */ |
| 86 | int x_menu_grab_keyboard = 1; | 86 | int x_menu_grab_keyboard = 1; |
| 87 | 87 | ||
| 88 | typedef void (*Wait_func)(); | ||
| 89 | |||
| 90 | static Wait_func wait_func; | ||
| 91 | static void* wait_data; | ||
| 92 | |||
| 93 | void | ||
| 94 | XMenuActivateSetWaitFunction (func, data) | ||
| 95 | Wait_func func; | ||
| 96 | void *data; | ||
| 97 | { | ||
| 98 | wait_func = func; | ||
| 99 | wait_data = data; | ||
| 100 | } | ||
| 101 | |||
| 88 | int | 102 | int |
| 89 | XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data, | 103 | XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data, |
| 90 | help_callback) | 104 | help_callback) |
| @@ -266,6 +280,7 @@ XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data, | |||
| 266 | * Begin event processing loop. | 280 | * Begin event processing loop. |
| 267 | */ | 281 | */ |
| 268 | while (1) { | 282 | while (1) { |
| 283 | if (wait_func) (*wait_func) (wait_data); | ||
| 269 | XNextEvent(display, &event); /* Get next event. */ | 284 | XNextEvent(display, &event); /* Get next event. */ |
| 270 | switch (event.type) { /* Dispatch on the event type. */ | 285 | switch (event.type) { /* Dispatch on the event type. */ |
| 271 | case Expose: | 286 | case Expose: |
| @@ -557,6 +572,8 @@ XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data, | |||
| 557 | free((char *)feq_tmp); | 572 | free((char *)feq_tmp); |
| 558 | } | 573 | } |
| 559 | 574 | ||
| 575 | wait_func = 0; | ||
| 576 | |||
| 560 | /* | 577 | /* |
| 561 | * Return successfully. | 578 | * Return successfully. |
| 562 | */ | 579 | */ |