From patchwork Sun May 23 08:29:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 53304 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D194CB7D40 for ; Sun, 23 May 2010 18:31:22 +1000 (EST) Received: from localhost ([127.0.0.1]:45526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OG6ac-0002ib-KK for incoming@patchwork.ozlabs.org; Sun, 23 May 2010 04:31:18 -0400 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 Received: from smtp04.web.de ( [172.20.0.225]) by fmmailgate01.web.de (Postfix) with ESMTP id 161B115B1154F; Sun, 23 May 2010 10:29:35 +0200 (CEST) Received: from [88.65.39.229] (helo=[192.168.1.10]) by smtp04.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1OG6Yq-0002bl-00; Sun, 23 May 2010 10:29:28 +0200 Message-ID: <4BF8E76E.7040601@web.de> Date: Sun, 23 May 2010 10:29:34 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: qemu-devel@nongnu.org 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> X-Enigmail-Version: 0.95.7 X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX18pFt7hoIZZLYGt/Plr49UdS7j6yR0wGnMHHs4a ex1aUeJHvUzasJPM4HkOBBXKdH6sD9pAe4vyzqElOwIsCDxVPM BOprHMdY4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: j.r.versteegh@gmail.com, Michael Tokarev Subject: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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_screen, int no_frame) if (no_frame) gui_noframe = 1; + if (!full_screen) { + setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0); + } + flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE; if (SDL_Init (flags)) { fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",