85 |
/* 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 */ |
86 |
int x_menu_grab_keyboard = 1; |
int x_menu_grab_keyboard = 1; |
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 |
|
|
102 |
int |
int |
103 |
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, |
104 |
help_callback) |
help_callback) |
280 |
* Begin event processing loop. |
* Begin event processing loop. |
281 |
*/ |
*/ |
282 |
while (1) { |
while (1) { |
283 |
|
if (wait_func) (*wait_func) (wait_data); |
284 |
XNextEvent(display, &event); /* Get next event. */ |
XNextEvent(display, &event); /* Get next event. */ |
285 |
switch (event.type) { /* Dispatch on the event type. */ |
switch (event.type) { /* Dispatch on the event type. */ |
286 |
case Expose: |
case Expose: |
572 |
free((char *)feq_tmp); |
free((char *)feq_tmp); |
573 |
} |
} |
574 |
|
|
575 |
|
wait_func = 0; |
576 |
|
|
577 |
/* |
/* |
578 |
* Return successfully. |
* Return successfully. |
579 |
*/ |
*/ |