qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] ui/cocoa.m: prevent stuck key situation


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: prevent stuck key situation
Date: Wed, 23 Sep 2015 14:46:36 -0700

On 23 September 2015 at 14:44, Programmingkid <address@hidden> wrote:
>
> On Sep 23, 2015, at 2:04 PM, Peter Maydell wrote:
>
>> On 18 September 2015 at 14:46, Programmingkid <address@hidden> wrote:
>>> When the user puts QEMU in the background while holding down a key, QEMU
>>> will
>>> not receive the keyup event when the user lets go of the key. When the user
>>> goes
>>> back to QEMU, QEMU will think the key is still down causing stuck key
>>> symptoms.
>>> This patch fixes this problem by releasing all keys when QEMU goes into the
>>> background.
>>
>> Looks like maybe you're not wrapping lines early enough in your
>> commit messages, resulting in this ugly effect when they're
>> quoted. It's best to not have lines longer than 75 chars or so.
>
> Sorry, will make the lines shorter in the future.
>
>>
>>> Signed-off-by: John Arbuckle <address@hidden>
>>>
>>> ---
>>> ui/cocoa.m |   17 ++++++++++++++++-
>>> 1 files changed, 16 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/ui/cocoa.m b/ui/cocoa.m
>>> index 334e6f6..d07b22d 100644
>>> --- a/ui/cocoa.m
>>> +++ b/ui/cocoa.m
>>> @@ -69,6 +69,7 @@ char **gArgv;
>>> bool stretch_video;
>>> NSTextField *pauseLabel;
>>> NSArray * supportedImageFileTypes;
>>> +int modifiers_state[256];
>>
>> Rather than making this global, could we have the applicationWillResignActive
>> method call a new raiseAllKeys method on the NSView?
>
> We could do that, but isn't this more of an app controller function?

I don't feel strongly about where things should live, globals just
make me think we could arrange things better somehow.

-- PMM



reply via email to

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