diff options
| author | Chong Yidong | 2006-09-13 22:39:23 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-09-13 22:39:23 +0000 |
| commit | 98a20c65dfeee04bb7d25e081c5b863de8fa9f33 (patch) | |
| tree | ca0765f4ed42e8ad059794c7bb2b2a4496b58c2a /src/xmenu.c | |
| parent | 29e49c4ee2957619bf7544254688e0f9314e0446 (diff) | |
| download | emacs-98a20c65dfeee04bb7d25e081c5b863de8fa9f33.tar.gz emacs-98a20c65dfeee04bb7d25e081c5b863de8fa9f33.zip | |
* xterm.c (x_initialize): Don't install Xt event timer here.
(x_timeout_atimer_activated_flag): New var.
(x_activate_timeout_atimer): New function to install Xt timer.
(x_send_scroll_bar_event, x_process_timeouts): Use it.
* xmenu.c (x_menu_set_in_use, popup_activate_callback)
(create_and_show_popup_menu, create_and_show_dialog): Use it.
* xterm.h (x_activate_timeout_atimer): prototype.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 574240a4560..63dfb5102bd 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1182,6 +1182,10 @@ x_menu_set_in_use (in_use) | |||
| 1182 | { | 1182 | { |
| 1183 | menu_items_inuse = in_use ? Qt : Qnil; | 1183 | menu_items_inuse = in_use ? Qt : Qnil; |
| 1184 | popup_activated_flag = in_use; | 1184 | popup_activated_flag = in_use; |
| 1185 | #ifdef USE_X_TOOLKIT | ||
| 1186 | if (popup_activated_flag) | ||
| 1187 | x_activate_timeout_atimer (); | ||
| 1188 | #endif | ||
| 1185 | } | 1189 | } |
| 1186 | 1190 | ||
| 1187 | /* Wait for an X event to arrive or for a timer to expire. */ | 1191 | /* Wait for an X event to arrive or for a timer to expire. */ |
| @@ -1498,6 +1502,9 @@ popup_activate_callback (widget, id, client_data) | |||
| 1498 | XtPointer client_data; | 1502 | XtPointer client_data; |
| 1499 | { | 1503 | { |
| 1500 | popup_activated_flag = 1; | 1504 | popup_activated_flag = 1; |
| 1505 | #ifdef USE_X_TOOLKIT | ||
| 1506 | x_activate_timeout_atimer (); | ||
| 1507 | #endif | ||
| 1501 | } | 1508 | } |
| 1502 | #endif | 1509 | #endif |
| 1503 | 1510 | ||
| @@ -2798,6 +2805,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) | |||
| 2798 | /* Display the menu. */ | 2805 | /* Display the menu. */ |
| 2799 | lw_popup_menu (menu, (XEvent *) &dummy); | 2806 | lw_popup_menu (menu, (XEvent *) &dummy); |
| 2800 | popup_activated_flag = 1; | 2807 | popup_activated_flag = 1; |
| 2808 | x_activate_timeout_atimer (); | ||
| 2801 | 2809 | ||
| 2802 | { | 2810 | { |
| 2803 | int fact = 4 * sizeof (LWLIB_ID); | 2811 | int fact = 4 * sizeof (LWLIB_ID); |
| @@ -3175,6 +3183,7 @@ create_and_show_dialog (f, first_wv) | |||
| 3175 | /* Display the dialog box. */ | 3183 | /* Display the dialog box. */ |
| 3176 | lw_pop_up_all_widgets (dialog_id); | 3184 | lw_pop_up_all_widgets (dialog_id); |
| 3177 | popup_activated_flag = 1; | 3185 | popup_activated_flag = 1; |
| 3186 | x_activate_timeout_atimer (); | ||
| 3178 | 3187 | ||
| 3179 | /* Process events that apply to the dialog box. | 3188 | /* Process events that apply to the dialog box. |
| 3180 | Also handle timers. */ | 3189 | Also handle timers. */ |