emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Re: silent PC vs. emacs]


From: Jan Djärv
Subject: Re: address@hidden: Re: silent PC vs. emacs]
Date: Tue, 05 Sep 2006 13:40:43 +0200
User-agent: Thunderbird 1.5.0.5 (X11/20060808)



Richard Stallman skrev:
Does anyone see a problem with this?
Can anyone confirm it is correct?


...

  #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 ();

This won't reactivate the timer because x_timeout_atimer_activated_flag is 1 ...


      }
+   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)

... so this test will fail.


+     {
+       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;
  }

        Jan D.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]