Don't reset the lastDeviceEventTime when doing DPMS actions

Richard Hughes hughsient at gmail.com
Fri Aug 14 04:07:28 PDT 2009


When we change the DPMS mode, don't play games with the last event
time as this breaks applications using IDLETIME to turn the backlight
off after a preset time.

This patch fixes gnome-power-manager and xfce-power-manager.
Previously gnome-power-manager was working around the idletime reset
by setting a 1ms second timer and ignoring the first if there was a
DPMS action in the last few ms. This was racey as hell, and it's
probably best just to fix the X bug once and for all.

The comment for TimeSinceLastInputEvent even says "Function used for
screensaver purposes by the os module. Returns the time in
milliseconds since there last was any input." so it's clearly for use
for screensavers and power managers rather than "what's the last time
of any action in the server".

Patch attached. Please review.

Thanks,

Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-reset-the-lastDeviceEventTime-when-doing-DPMS.patch
Type: application/force-download
Size: 1540 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090814/595c58c4/attachment.bin>


More information about the xorg mailing list