From: Anthony Liguori <anthony@codemonkey.ws>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: j.r.versteegh@gmail.com, Jan Kiszka <jan.kiszka@web.de>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default
Date: Mon, 24 May 2010 16:52:59 -0500 [thread overview]
Message-ID: <4BFAF53B.30102@codemonkey.ws> (raw)
In-Reply-To: <4BFAF249.9050502@msgid.tls.msk.ru>
On 05/24/2010 04:40 PM, Michael Tokarev wrote:
> 23.05.2010 12:29, Jan Kiszka wrote:
>> 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);
>> + }
>> +
>
> I think it's conceptually wrong.
>
> It's trivial to toggle full-screen mode by hitting Ctrl+Alt+F.
I don't think it's worth jumping through hoops to conditionally
disable/enable screensaver.
More sophisticated screen saver behavior should be implemented in
upstream SDL.
Regards,
Anthony Liguori
> Following this logic, on each toggle we should toggle the
> environment variable (which wont work). Or else the next bug
> report to be filed is that screen saver isn't re-enabled when
> switching from fullscreen to window and it isn't re-disabled
> when switching to fullscreen.
>
> How about not poking at screensaver by default unconditionally?
> To me it sound more correct. I.e., the above setenv(), but
> without the if part...
>
> Thanks!
>
> /mjt
next prev parent reply other threads:[~2010-05-24 21:53 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 ` [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default Jan Kiszka
2010-05-24 20:28 ` Anthony Liguori
2010-05-24 21:40 ` Michael Tokarev
2010-05-24 21:42 ` Michael Tokarev
2010-05-24 21:52 ` Anthony Liguori [this message]
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=4BFAF53B.30102@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=j.r.versteegh@gmail.com \
--cc=jan.kiszka@web.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).