Don't reset the lastDeviceEventTime when doing DPMS actions

Peter Hutterer peter.hutterer at who-t.net
Sun Aug 16 21:43:50 PDT 2009


On Fri, Aug 14, 2009 at 12:07:28PM +0100, Richard Hughes wrote:
> 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.

Tested, seems to work fine.
Pushed as c1d901d723c3bee523736eacc15b44a7dff484fe, thanks for the patch!
(btw. next time please send patches to xorg-devel at freedesktop.org)

Cheers,
  Peter




More information about the xorg mailing list