[PATCH] wined3d: Inhibit the screensaver while a full-screen application has focus.
Dmitry Timoshkov
dmitry at baikal.ru
Thu Jul 25 21:06:45 CDT 2019
Zebediah Figura <zfigura at codeweavers.com> wrote:
> @@ -1033,6 +1033,7 @@ HRESULT CDECL wined3d_device_acquire_focus_window(struct wined3d_device *device,
>
> InterlockedExchangePointer((void **)&device->focus_window, window);
> SetWindowPos(window, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
> + SystemParametersInfoW(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0);
>
> return WINED3D_OK;
> }
> @@ -1043,6 +1044,7 @@ void CDECL wined3d_device_release_focus_window(struct wined3d_device *device)
>
> if (device->focus_window) wined3d_unregister_window(device->focus_window);
> InterlockedExchangePointer((void **)&device->focus_window, NULL);
> + SystemParametersInfoW(SPI_SETSCREENSAVEACTIVE, TRUE, NULL, 0);
> }
It would probably make sense to set screensaver value to its original
state, so if screensaver was originally disabled then don't accidently
enable it.
--
Dmitry.
More information about the wine-devel
mailing list