[client] displayserver: move screensaver handling into displayservers

This also makes Wayland idle inhibition respect noScreensaver setting.
This commit is contained in:
Quantum
2021-01-18 16:08:38 -05:00
committed by Geoffrey McRae
parent 44a949f5c6
commit 2f11024db8
5 changed files with 33 additions and 8 deletions

View File

@@ -222,6 +222,16 @@ static void sdlRealignPointer(void)
app_handleMouseNormal(0, 0);
}
static void sdlInhibitIdle(void)
{
SDL_DisableScreenSaver();
}
static void sdlUninhibitIdle(void)
{
SDL_EnableScreenSaver();
}
struct LG_DisplayServerOps LGDS_SDL =
{
.subsystem = SDL_SYSWM_UNKNOWN,
@@ -238,6 +248,8 @@ struct LG_DisplayServerOps LGDS_SDL =
.ungrabKeyboard = sdlUngrabKeyboard,
.warpPointer = sdlWarpPointer,
.realignPointer = sdlRealignPointer,
.inhibitIdle = sdlInhibitIdle,
.uninhibitIdle = sdlUninhibitIdle,
/* SDL does not have clipboard support */
.cbInit = NULL,