qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default
Date: Mon, 24 May 2010 15:28:32 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 05/23/2010 03:29 AM, Jan Kiszka wrote:
From: Jan Kiszka<address@hidden>

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<address@hidden>

Applied.  Thanks.

This also fixes https://bugs.launchpad.net/qemu/+bug/583462.

Regards,

Anthony Liguori

---

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]