[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c
From: |
Kim F . Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c |
Date: |
Sat, 09 Oct 2004 19:32:58 -0400 |
Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.791 emacs/src/keyboard.c:1.792
*** emacs/src/keyboard.c:1.791 Fri Aug 20 10:34:12 2004
--- emacs/src/keyboard.c Sat Oct 9 23:24:49 2004
***************
*** 676,681 ****
--- 676,684 ----
static void clear_event P_ ((struct input_event *));
static void any_kboard_state P_ ((void));
static SIGTYPE interrupt_signal P_ ((int signalnum));
+ static void timer_start_idle P_ ((void));
+ static void timer_stop_idle P_ ((void));
+ static void timer_resume_idle P_ ((void));
/* Nonzero means don't try to suspend even if the operating system seems
to support it. */
***************
*** 2387,2393 ****
volatile Lisp_Object also_record;
volatile int reread;
struct gcpro gcpro1, gcpro2;
- EMACS_TIME last_idle_start;
int polling_stopped_here = 0;
also_record = Qnil;
--- 2390,2395 ----
***************
*** 2894,2902 ****
non_reread:
- /* Record the last idle start time so that we can reset it
- should the next event read be a help-echo. */
- last_idle_start = timer_idleness_start_time;
timer_stop_idle ();
RESUME_POLLING;
--- 2896,2901 ----
***************
*** 2936,2942 ****
prevents automatic window selection (under
mouse_autoselect_window from acting as a real input event, for
example banishing the mouse under mouse-avoidance-mode. */
! timer_idleness_start_time = last_idle_start;
/* Resume allowing input from any kboard, if that was true before. */
if (!was_locked)
--- 2935,2941 ----
prevents automatic window selection (under
mouse_autoselect_window from acting as a real input event, for
example banishing the mouse under mouse-avoidance-mode. */
! timer_resume_idle ();
/* Resume allowing input from any kboard, if that was true before. */
if (!was_locked)
***************
*** 3135,3141 ****
show_help_echo (help, window, object, position, 0);
/* We stopped being idle for this event; undo that. */
! timer_idleness_start_time = last_idle_start;
goto retry;
}
--- 3134,3140 ----
show_help_echo (help, window, object, position, 0);
/* We stopped being idle for this event; undo that. */
! timer_resume_idle ();
goto retry;
}
***************
*** 4252,4258 ****
/* Record the start of when Emacs is idle,
for the sake of running idle-time timers. */
! void
timer_start_idle ()
{
Lisp_Object timers;
--- 4251,4257 ----
/* Record the start of when Emacs is idle,
for the sake of running idle-time timers. */
! static void
timer_start_idle ()
{
Lisp_Object timers;
***************
*** 4280,4291 ****
/* Record that Emacs is no longer idle, so stop running idle-time timers. */
! void
timer_stop_idle ()
{
EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1);
}
/* This is only for debugging. */
struct input_event last_timer_event;
--- 4279,4301 ----
/* Record that Emacs is no longer idle, so stop running idle-time timers. */
! static void
timer_stop_idle ()
{
EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1);
}
+ /* Resume idle timer from last idle start time. */
+
+ static void
+ timer_resume_idle ()
+ {
+ if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
+ return;
+
+ timer_idleness_start_time = timer_last_idleness_start_time;
+ }
+
/* This is only for debugging. */
struct input_event last_timer_event;
***************
*** 8847,8860 ****
keymap may have changed, so replay the sequence. */
if (BUFFERP (key))
{
! EMACS_TIME initial_idleness_start_time;
! EMACS_SET_SECS_USECS (initial_idleness_start_time,
! EMACS_SECS (timer_last_idleness_start_time),
! EMACS_USECS
(timer_last_idleness_start_time));
!
! /* Resume idle state, using the same start-time as before. */
! timer_start_idle ();
! timer_idleness_start_time = initial_idleness_start_time;
mock_input = t;
/* Reset the current buffer from the selected window
--- 8857,8863 ----
keymap may have changed, so replay the sequence. */
if (BUFFERP (key))
{
! timer_resume_idle ();
mock_input = t;
/* Reset the current buffer from the selected window
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/keyboard.c,
Kim F . Storm <=