From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41033 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OG6Z0-00025N-H6 for qemu-devel@nongnu.org; Sun, 23 May 2010 04:29:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OG6Yy-0006lS-PI for qemu-devel@nongnu.org; Sun, 23 May 2010 04:29:38 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:40189) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OG6Yy-0006lI-Iy for qemu-devel@nongnu.org; Sun, 23 May 2010 04:29:36 -0400 Message-ID: <4BF8E76E.7040601@web.de> Date: Sun, 23 May 2010 10:29:34 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20100520181304.10437.90521.malonedeb@potassium.ubuntu.com> <20100522234727.1683.30745.malone@palladium.canonical.com> In-Reply-To: <20100522234727.1683.30745.malone@palladium.canonical.com> Content-Type: text/plain; charset=UTF-8 Sender: jan.kiszka@web.de Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: j.r.versteegh@gmail.com, Michael Tokarev From: Jan Kiszka Unless we are running in full-screen mode, QEMU's SDL window should not disable the host's screensaver. The user can still change this behaviour by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as desired. Signed-off-by: Jan Kiszka --- Cool, thanks for digging out SDL_VIDEO_ALLOW_SCREENSAVER. I came across by this issue as well but I was too lazy to analyze to reason. This patch solves it for me. sdl.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/sdl.c b/sdl.c index 16a48e9..3bdd518 100644 --- a/sdl.c +++ b/sdl.c @@ -855,6 +855,10 @@ void sdl_display_init(DisplayState *ds, int full_scr= een, int no_frame) if (no_frame) gui_noframe =3D 1; =20 + if (!full_screen) { + setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0); + } + flags =3D SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE; if (SDL_Init (flags)) { fprintf(stderr, "Could not initialize SDL(%s) - exiting\n", --=20 1.6.0.2