~psusi/ubuntu/natty/gnome-power-manager/sleep

« back to all changes in this revision

Viewing changes to src/egg-idletime.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2010-03-31 18:02:57 UTC
  • mfrom: (2.2.7 upstream)
  • mto: (24.1.12 squeeze)
  • mto: This revision was merged to the branch mainline in revision 170.
  • Revision ID: james.westby@ubuntu.com-20100331180257-adoalcy5arv3znld
Tags: 2.30.0-1
* New upstream release.
* debian/patches/04_cast-align.patch
  - Removed, -Werror is no longer enforced by default.
* debian/patches/07-bugreport-upower.patch
  - Removed, merged upstream.
* debian/patches/09-inhibit-consolekit-events-after-resume.patch
  - Removed, merged upstream.
* debian/patches/10-do-not-exit-if-hal-is-not-available.patch
  - Removed, merged upstream.
* debian/patches/11-only-connect-to-hal-if-there-is-no-xrandr-hardware.patch
  - Removed, merged upstream.
* debian/patches/12-DeviceKit-disks-is-now-called-UDisks.patch
  - Removed, merged upstream.
* debian/patches/90_autoconf.patch
  - Removed, obsolete.
* debian/rules
  - Remove obsolete configure switch --with-dpms-ext.
* Switch to source format 3.0 (quilt).
  - Add debian/source/format.
  - Drop quilt from Build-Depends.
  - Remove /usr/share/cdbs/1/rules/patchsys-quilt.mk include.
* debian/patches/09-fix-critical-warning-from-gpmscreensaver.patch
  - Fix up a critical warning from the GpmScreensaver code on startup. Patch
    pulled from upstream Git.
* debian/copyright
  - Update list of copyright holders and add copyright years.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 *
17
17
 * You should have received a copy of the GNU General Public License
18
18
 * along with this program; if not, write to the Free Software
19
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
20
 */
21
21
 
22
22
#ifdef HAVE_CONFIG_H
146
146
 
147
147
        g_return_if_fail (EGG_IS_IDLETIME (idletime));
148
148
 
 
149
        if (!idletime->priv->reset_set)
 
150
                return;
 
151
 
149
152
        /* reset all the alarms (except the reset alarm) to their timeouts */
150
153
        for (i=1; i<idletime->priv->array->len; i++) {
151
154
                alarm = g_ptr_array_index (idletime->priv->array, i);
188
191
        EggIdletimeAlarm *alarm;
189
192
        int overflow;
190
193
        XSyncValue add;
 
194
        gint64 current, reset_threshold;
191
195
 
192
196
        alarm = egg_idletime_alarm_find_id (idletime, 0);
193
197
 
203
207
 
204
208
                /* don't try to set this again if multiple timers are going off in sequence */
205
209
                idletime->priv->reset_set = TRUE;
 
210
 
 
211
                current = egg_idletime_get_time (idletime);
 
212
                reset_threshold = egg_idletime_xsyncvalue_to_int64 (alarm->timeout);
 
213
                if (current < reset_threshold) {
 
214
                        /* We've missed the alarm already */
 
215
                        egg_idletime_alarm_reset_all (idletime);
 
216
                }
206
217
        }
207
218
}
208
219