[PATCH] wined3d: Inhibit the screensaver while a full-screen application has focus.
Zebediah Figura
zfigura at codeweavers.com
Mon Jul 29 14:14:44 CDT 2019
On 7/25/19 9:06 PM, Dmitry Timoshkov wrote:
> 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.
>
Sure; I've sent a new patch which does this.
More information about the wine-devel
mailing list