xserver/hw/xwin
Jon TURNEY 127a7068b7 hw/xwin: Allow XScreenSaverSuspend() to effect Windows screen saver or monitor power off
Reset the idle timer in the block handler if screenSaverSuspended is set.

This isn't quite a complete solution.  We should also set the block timeout to
something less than the idle timer timeout to ensure we will reset the idle
timer before it times out if we are blocking.

The idle timer timeout is presumably the first one to expire of the screen saver
activation or monitor low power or power down timeout, depending on
configuration.

Unfortunately this is probably not straightforward to do. Whilst
SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT) is portable, apparently
SPI_GETLOWPOWERTIMEOUT and SPI_GETPOWEROFFTIMEOUT are not supported by Windows
versions 6.0 or later, and the interface for discovering equivalent value is
complex.

This doesn't matter in the case where a media player or similar application is
the one making the XScreenSaverSuspend() requests, as it will be continuously
drawing, causing the X server to become unblocked often.

In the case where slide show presentation application or similar is the one
making the XScreenSaverSuspend() request, this might be a problem.

Since "Powerpoint is Evil" [1], I think we'll leave it like this till someone
complains :-)

[1] http://www.edwardtufte.com/tufte/books_pp

v2: conditionalize on SCREENSAVER

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-11-27 14:37:00 +00:00
..
glx hw/xwin: Fix some of the warnings in generated gl wrapper code 2012-10-16 22:29:48 +01:00
man hw/xwin: Refer to xkeyboard-config man page for XKB configuration option values 2012-07-16 13:59:40 +01:00
.gitignore XWin: build XWin man pages using XORG_MANPAGE_SECTIONS 2011-01-18 15:10:21 -08:00
InitInput.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
InitOutput.c hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winerror.c 2012-10-16 22:29:51 +01:00
Makefile.am hw/xwin: Link with libdxguid rather than defining the DirectX GUIDs ourselves 2012-11-05 11:14:21 +00:00
X.ico Cygwin/X: Update the native icon to one based on the X.Org logo 2008-12-15 12:42:10 +00:00
XWin.exe.manifest Cygwin/X: Make default DPI match native DPI 2011-11-02 13:56:22 +00:00
XWin.rc Cygwin/X: Left-justify website link in About box 2011-06-29 19:14:38 +01:00
ddraw.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
system.XWinrc Cygwin/X: Tidy up system.Xwinrc 2010-02-05 19:15:04 +00:00
win.h hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winerror.c 2012-10-16 22:29:51 +01:00
winallpriv.c hw/xwin: Fix using index as a formal parameter shadows index() 2012-10-16 21:23:54 +01:00
winauth.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winblock.c hw/xwin: Allow XScreenSaverSuspend() to effect Windows screen saver or monitor power off 2012-11-27 14:37:00 +00:00
winclip.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winclipboard.h hw/xwin: Use char strings in winClipboardUNIXtoDOS for consistency with the rest of the clipboard code 2012-10-16 22:29:50 +01:00
winclipboardinit.c hw/xwin: Tidy up some pointless output which is always emitted 2012-07-16 13:52:37 +01:00
winclipboardtextconv.c hw/xwin: Use char strings in winClipboardUNIXtoDOS for consistency with the rest of the clipboard code 2012-10-16 22:29:50 +01:00
winclipboardthread.c hw/xwin: Fix no return value warning in winClipboardProc() 2012-10-17 13:18:42 +01:00
winclipboardwndproc.c hw/xwin: Introduce winProcessXEventsTimeout() to the concept of fractions of a second 2012-08-03 22:48:09 +01:00
winclipboardwrappers.c hw/xwin: Fix redundant declarations in winclipboardwrappers.c 2012-10-16 21:19:00 +01:00
winclipboardxevents.c hw/xwin: Remove winClipboardDetectUnicodeSupport() 2012-07-16 13:56:31 +01:00
wincmap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winconfig.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winconfig.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
wincreatewnd.c hw/xwin: Bug fixes for screen sizing when the screen window is on a non-primary monitor 2012-07-16 13:54:15 +01:00
wincursor.c hw/xwin: Fix shadowed local variables in winLoadCursor() 2012-10-16 21:25:45 +01:00
windialogs.c hw/xwin: Tidy up some more pointless output which is always emitted 2012-07-16 13:55:02 +01:00
winengine.c hw/xwin: Report which drawing engines are being enabled when checking for support 2012-11-27 13:49:11 +00:00
winerror.c hw/xwin: Show any fatal error message 2012-11-27 13:48:44 +00:00
winfillsp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winfont.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
wingc.c hw/xwin: Remove obsolete redundant declarations of winPushPixels() 2012-10-16 21:21:50 +01:00
wingetsp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winglobals.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winglobals.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winkeybd.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winkeybd.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winkeyhook.c hw/xwin: Remove a pointless OS version check in winInstallKeyboardHookLL() 2012-07-16 13:56:54 +01:00
winkeynames.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winlayouts.h hw/xwin: Fix warning about discarding const in initializing winKBLayouts 2012-10-16 22:29:49 +01:00
winmessages.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winmisc.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winmonitors.c hw/xwin: Fix using index as a formal parameter in winmonitors.c shadows index() 2012-10-16 21:22:40 +01:00
winmonitors.h hw/xwin: Bug fixes for screen sizing when the screen window is on a non-primary monitor 2012-07-16 13:54:15 +01:00
winmouse.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winms.h hw/xwin: Wrap 'Status' when including ddraw.h 2012-11-05 11:14:54 +00:00
winmsg.c hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winmsg.c 2012-10-16 22:29:53 +01:00
winmsg.h hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winmsg.c 2012-10-16 22:29:53 +01:00
winmultiwindowclass.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winmultiwindowclass.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winmultiwindowicons.c hw/xwin: Make winOverrideIcon() thread-safe for icon data access 2012-08-03 22:47:42 +01:00
winmultiwindowicons.h hw/xwin: Make winOverrideIcon() thread-safe for icon data access 2012-08-03 22:47:42 +01:00
winmultiwindowshape.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winmultiwindowwindow.c hw/xwin: Make winOverrideIcon() thread-safe for icon data access 2012-08-03 22:47:42 +01:00
winmultiwindowwm.c hw/xwin: Remove pointless winFinishCreateWindowsWindowDDNL() 2012-11-05 11:14:45 +00:00
winmultiwindowwndproc.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winnativegdi.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
winpfbdd.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
winpixmap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winpolyline.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winprefs.c hw/xwin: fmemopen is available on cygwin but not MinGW 2012-10-29 12:22:07 +00:00
winprefs.h hw/xwin: Make winOverrideIcon() thread-safe for icon data access 2012-08-03 22:47:42 +01:00
winprefslex.l hw/xwin: Fix various warnings in code generated by lex/yacc 2012-10-16 21:17:35 +01:00
winprefsyacc.y hw/xwin: Fix using menu as a formal parameter shadows a global variable of the same name 2012-10-16 21:24:23 +01:00
winprocarg.c hw/xwin: Avoid logging an extra blank line if BUILDERSTRING is empty 2012-11-27 13:49:34 +00:00
winrandr.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winresource.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winrop.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winscrinit.c hw/xwin: Fix using index as a formal parameter in winscrinit.c shadows index() 2012-10-16 21:23:29 +01:00
winsetsp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winshaddd.c hw/xwin: Link with libdxguid rather than defining the DirectX GUIDs ourselves 2012-11-05 11:14:21 +00:00
winshadddnl.c hw/xwin: Remove pointless winFinishCreateWindowsWindowDDNL() 2012-11-05 11:14:45 +00:00
winshadgdi.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
wintrayicon.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winvalargs.c hw/xwin: Remove unused variables in winvalargs.c 2012-10-17 13:18:17 +01:00
winvideo.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winwakeup.c xwin: fixup block/wakeup handlers 2012-06-05 13:02:38 -07:00
winwin32rootless.c hw/xwin: Make winOverrideIcon() thread-safe for icon data access 2012-08-03 22:47:42 +01:00
winwin32rootlesswindow.c hw/xwin: Make winOverrideIcon() thread-safe for icon data access 2012-08-03 22:47:42 +01:00
winwin32rootlesswndproc.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
winwindow.c hw/xwin: Remove unused variables in winwindow.c 2012-10-17 13:18:39 +01:00
winwindow.h hw/xwin: Remove pointless winFinishCreateWindowsWindowDDNL() 2012-11-05 11:14:45 +00:00
winwindowswm.c hw/xwin: Remove unused variables in winwindowswm.c 2012-10-16 22:40:13 +01:00
winwndproc.c hw/xwin: RANDR resize didn't occur when screen window was maximized or restored 2012-07-16 13:54:39 +01:00