gnome-control-center/typing-break
Jens Granseuer 543251c2c6 [typing-break] Reset timer after suspend
This patch does 2 things:
1) Defines a DrwTimer that we use instead of GTimer. This is just a thin
wrapper around g_get_current_time, and it means we can accurately track
typing/idle periods based on real-world wall-clock time, which GTimer is
apparently not intended to do.

2) The typing monitor has some complicated state handling where it transitions
between an IDLE state and a TYPING state. This transition is based on running a
callback once per second, and checking whether any keystrokes have been
recorded since the last time the callback was called. The actual idle *time* is
tracked separately, independently of these two states, but only when we are in
the IDLE *state* was the idle *time* checked to see if we should reset the
break timer. This leads to a race condition -- if we suspend while in the
TYPING state, then eventually we will wake up, notice that no key press has
happened in the last second, *reset the idle timer*, transition to the IDLE
state, and then check the amount of time on the idle timer. We will thus never
notice the amount of time that the computer was suspended.

I considered making the IDLE/TYPING transition code smarter, but it turns out
the desired behavior for the two states is entirely identical anyway, so rather
than adding more complexity to this pointless code, I just diked it out and
replaced them both by a single state called RUNNING.

Closes bug #430797.
2009-11-11 19:39:57 +01:00
..
bar-disabled.png new Tango-style icons by David Prieto <frandavid100@gmail.com> (bug 2008-03-24 18:11:37 +00:00
bar-green.png new Tango-style icons by David Prieto <frandavid100@gmail.com> (bug 2008-03-24 18:11:37 +00:00
bar-red.png new Tango-style icons by David Prieto <frandavid100@gmail.com> (bug 2008-03-24 18:11:37 +00:00
bar.png new Tango-style icons by David Prieto <frandavid100@gmail.com> (bug 2008-03-24 18:11:37 +00:00
ChangeLog post-release bump to 2.25.91 2009-02-04 22:30:58 +00:00
drw-break-window.c [typing-break] Reset timer after suspend 2009-11-11 19:39:57 +01:00
drw-break-window.h Patch by: Maxim Ermilov <zaspire@rambler.ru> 2008-11-20 18:43:38 +00:00
drw-monitor.c Patch by: Maxim Ermilov <zaspire@rambler.ru> 2008-11-20 18:43:38 +00:00
drw-monitor.h Remove this and use gnome-i18n.h instead. 2003-06-27 15:47:32 +00:00
drw-selection.c Patch by: Maxim Ermilov <zaspire@rambler.ru> 2008-11-20 18:26:55 +00:00
drw-selection.h Huge cleanup. Individual ChangeLogs have info. Closing bug #320157. ANSIfy 2005-11-14 15:18:09 +00:00
drw-timer.c [typing-break] Reset timer after suspend 2009-11-11 19:39:57 +01:00
drw-timer.h [typing-break] Reset timer after suspend 2009-11-11 19:39:57 +01:00
drw-utils.c Replace deprecated GTK symbols. Fixes part of bug #572325 2009-02-22 22:01:40 +00:00
drw-utils.h Patch by: Maxim Ermilov <zaspire@rambler.ru> 2008-11-20 18:43:38 +00:00
drwright.c [typing-break] Reset timer after suspend 2009-11-11 19:39:57 +01:00
drwright.h Remove this and use gnome-i18n.h instead. 2003-06-27 15:47:32 +00:00
main.c NULL-terminate the options array. fixed. 2007-06-08 11:56:47 +00:00
Makefile.am [typing-break] Reset timer after suspend 2009-11-11 19:39:57 +01:00
ocean-stripes.png added the typing break to CVS from drwright. 2003-06-26 11:40:10 +00:00
stock_stop.png added the typing break to CVS from drwright. 2003-06-26 11:40:10 +00:00
typing-monitor.png set default window icon and application name install icons use 2007-01-09 19:13:39 +00:00
typing-monitor.svg set default window icon and application name install icons use 2007-01-09 19:13:39 +00:00