#endif /* USE_X_TOOLKIT */
- --- 10818,10857 ----
x_process_timeouts (timer)
struct atimer *timer;
{
+ BLOCK_INPUT;
if (toolkit_scroll_bar_interaction || popup_activated ())
{
while (XtAppPending (Xt_app_con) & XtIMTimer)
XtAppProcessEvent (Xt_app_con, XtIMTimer);
! /* Reactivate the atimer for next time. */
! x_activate_timeout_atimer ();
}
+ else
+ x_timeout_atimer_activated_flag = 0;
+ UNBLOCK_INPUT;
+ }
+
+ /* Install an asynchronous timer that processes Xt timeout events
+ every 0.1s as long as either `toolkit_scroll_bar_interaction' or
+ `popup_activated_flag' (in xmenu.c) is set. Make sure to call this
+ function whenever these variables are set. This is necessary
+ because some widget sets use timeouts internally, for example the
+ LessTif menu bar, or the Xaw3d scroll bar. When Xt timeouts aren't
+ processed, these widgets don't behave normally. */
+
+ void
+ x_activate_timeout_atimer ()
+ {
+ BLOCK_INPUT;
+ if (!x_timeout_atimer_activated_flag)
+ {
+ EMACS_TIME interval;
+
+ EMACS_SET_SECS_USECS (interval, 0, 100000);
+ start_atimer (ATIMER_RELATIVE, interval, x_process_timeouts, 0);
+ x_timeout_atimer_activated_flag = 1;
+ }
+ UNBLOCK_INPUT;
}