aboutsummaryrefslogtreecommitdiffstats
path: root/oldXMenu/Activate.c
diff options
context:
space:
mode:
Diffstat (limited to 'oldXMenu/Activate.c')
-rw-r--r--oldXMenu/Activate.c17
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 */
86int x_menu_grab_keyboard = 1; 86int x_menu_grab_keyboard = 1;
87 87
88typedef void (*Wait_func)();
89
90static Wait_func wait_func;
91static void* wait_data;
92
93void
94XMenuActivateSetWaitFunction (func, data)
95 Wait_func func;
96 void *data;
97{
98 wait_func = func;
99 wait_data = data;
100}
101
88int 102int
89XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data, 103XMenuActivate(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 */