qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Brad Jorsch <anomie@users.sourceforge.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/2] Fix clearing modifiers on focus loss
Date: Wed,  5 May 2010 00:17:08 -0400	[thread overview]
Message-ID: <1273033029-15622-2-git-send-email-anomie@users.sourceforge.net> (raw)
In-Reply-To: <1273033029-15622-1-git-send-email-anomie@users.sourceforge.net>

It seems there is an intention to clear all modifier keys (in the SDL
front-end) when the window loses focus, but it seems that it doesn't
work right. Let's just explicitly do it when we lose input focus.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
---
 sdl.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sdl.c b/sdl.c
index f6fabf1..c155113 100644
--- a/sdl.c
+++ b/sdl.c
@@ -728,6 +728,9 @@ static void sdl_refresh(DisplayState *ds)
             }
             break;
         case SDL_ACTIVEEVENT:
+            if (ev->active.state == SDL_APPINPUTFOCUS && !ev->active.gain) {
+                reset_keys();
+            }
             if (gui_grab && ev->active.state == SDL_APPINPUTFOCUS &&
                 !ev->active.gain && !gui_fullscreen_initial_grab) {
                 sdl_grab_end();
-- 
1.7.1

  reply	other threads:[~2010-05-05  4:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05  4:17 [Qemu-devel] [PATCH 0/2] Release modifier keys (including Meta) on loss of focus Brad Jorsch
2010-05-05  4:17 ` Brad Jorsch [this message]
2010-05-05  4:17 ` [Qemu-devel] [PATCH 2/2] Count "logo" keys as modifier keys Brad Jorsch
2010-05-05 19:42   ` Anthony Liguori

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=1273033029-15622-2-git-send-email-anomie@users.sourceforge.net \
    --to=anomie@users.sourceforge.net \
    --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).