diff --git a/src/framework/WindowManager.cpp b/src/framework/WindowManager.cpp index dfbcd836e23bd26790fe013e72a60b685b3a1280..8e363ad871aa351d2be1bfe81ed751b6174586b5 100644 --- a/src/framework/WindowManager.cpp +++ b/src/framework/WindowManager.cpp @@ -37,6 +37,9 @@ WindowManager::~WindowManager() bool WindowManager::initialize(const int width, const int height, const int frameRate) { + // allow screensaver (or we might block BOINC's own, our parent) + SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1"); + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) { cerr << "Window system could not be initalized: " << SDL_GetError() << endl; return false; @@ -44,12 +47,6 @@ bool WindowManager::initialize(const int width, const int height, const int fram atexit(SDL_Quit); - // allow screensaver (or we might block BOINC's own, our parent) - SDL_EnableScreenSaver(); - if (SDL_IsScreenSaverEnabled() == SDL_FALSE) { - cerr << "Screensavers couldn't be enabled! This might break usage as BOINC screensaver..." << endl; - } - // retrieve current video settings (of the primary display) SDL_DisplayMode mode; if (!SDL_GetDesktopDisplayMode(0, &mode)) {