All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Cc: j.r.versteegh@gmail.com, Michael Tokarev <mjt@tls.msk.ru>
Subject: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default
Date: Sun, 23 May 2010 10:29:34 +0200	[thread overview]
Message-ID: <4BF8E76E.7040601@web.de> (raw)
In-Reply-To: <20100522234727.1683.30745.malone@palladium.canonical.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

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 <jan.kiszka@siemens.com>
---

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",
-- 
1.6.0.2

  reply	other threads:[~2010-05-23  8:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-20 18:13 [Qemu-devel] [Bug 583462] [NEW] qemu disables screensaver Jaap Versteegh
2010-05-20 18:13 ` [Qemu-devel] [Bug 583462] " Jaap Versteegh
2010-05-21 16:10 ` Michael Tokarev
2010-05-22 18:25 ` Jaap Versteegh
2010-05-22 23:47 ` Jaap Versteegh
2010-05-23  8:29   ` Jan Kiszka [this message]
2010-05-24 20:28     ` [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default Anthony Liguori
2010-05-24 21:40     ` Michael Tokarev
2010-05-24 21:42       ` Michael Tokarev
2010-05-24 21:52       ` Anthony Liguori
2010-05-24 20:29 ` [Qemu-devel] [Bug 583462] Re: qemu disables screensaver Anthony Liguori
2011-02-20 17:13 ` Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BF8E76E.7040601@web.de \
    --to=jan.kiszka@web.de \
    --cc=j.r.versteegh@gmail.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.