qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] af8862: Improve Cocoa modifier key handling


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] af8862: Improve Cocoa modifier key handling
Date: Tue, 20 Jun 2017 01:06:45 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: af8862b2a2445d0110f3b3125c1a41fbb5934123
      
https://github.com/qemu/qemu/commit/af8862b2a2445d0110f3b3125c1a41fbb5934123
  Author: Ian McKellar via Qemu-devel <address@hidden>
  Date:   2017-06-14 (Wed, 14 Jun 2017)

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  Improve Cocoa modifier key handling

I had two problems with QEMU on macOS:
 1) Sometimes when alt-tabbing to QEMU it would act as if the 'a' key
    was pressed so I'd get 'aaaaaaaaa....'.
 2) Using Sikuli to programatically send keys to the QEMU window text
    like "foo_bar" would come out as "fooa-bar".

They looked similar and after much digging the problem turned out to be
the same. When QEMU's ui/cocoa.m received an NSFlagsChanged NSEvent it
looked at the keyCode to determine what modifier key changed. This
usually works fine but sometimes the keyCode is 0 and the app should
instead be looking at the modifierFlags bitmask. Key code 0 is the 'a'
key.

I added code that handles keyCode == 0 differently. It checks the
modifierFlags and if they differ from QEMU's idea of which modifier
keys are currently pressed it toggles those changed keys.

This fixes my problems and seems work fine.

Signed-off-by: Ian McKellar <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: bfefa6d7d6e930429ac3a7ff3347c9c67f069289
      
https://github.com/qemu/qemu/commit/bfefa6d7d6e930429ac3a7ff3347c9c67f069289
  Author: Jonathon Jongsma <address@hidden>
  Date:   2017-06-14 (Wed, 14 Jun 2017)

  Changed paths:
    M ui/spice-input.c

  Log Message:
  -----------
  spice: Use proper enum type for kbd led state

Although the Qemu and spice flags currently have the same value, it
seems more correct to pass the spice flag values to
spice_server_kbd_leds(), especially considering that this function
already makes an effort to convert between the QEMU_*_LED and
SPICE_KEYBOARD_MODIFIER_* values.

Signed-off-by: Jonathon Jongsma <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 5fe309ff0d1e8234fd79c21544bfcc436ece6386
      
https://github.com/qemu/qemu/commit/5fe309ff0d1e8234fd79c21544bfcc436ece6386
  Author: Gerd Hoffmann <address@hidden>
  Date:   2017-06-14 (Wed, 14 Jun 2017)

  Changed paths:
    M configure

  Log Message:
  -----------
  gtk: prefer gtk3 over gtk2

In case the configure script finds both gtk2 and gtk3 installed it
still prefers gtk2 over gtk3.  Prefer gtk3 instead.

Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-id: address@hidden


  Commit: 8f4ea9cd0b770dbe496d9d24f0ef8813fdbfe0d0
      
https://github.com/qemu/qemu/commit/8f4ea9cd0b770dbe496d9d24f0ef8813fdbfe0d0
  Author: Gerd Hoffmann <address@hidden>
  Date:   2017-06-14 (Wed, 14 Jun 2017)

  Changed paths:
    M configure

  Log Message:
  -----------
  sdl: prefer sdl2 over sdl1

In case the configure script finds both SDL 1.2 and SDL 2.x installed
it still prefers SDL 1.2.  Prefer SDL 2.x instead.

Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-id: address@hidden


  Commit: fe5c44f9c95be3f74fb58902077ac587998d1392
      
https://github.com/qemu/qemu/commit/fe5c44f9c95be3f74fb58902077ac587998d1392
  Author: Gerd Hoffmann <address@hidden>
  Date:   2017-06-14 (Wed, 14 Jun 2017)

  Changed paths:
    M include/ui/spice-display.h
    M ui/spice-core.c
    M ui/spice-display.c

  Log Message:
  -----------
  spice: don't enter opengl mode in case another UI provides opengl support

Signed-off-by: Gerd Hoffmann <address@hidden>
Message-id: address@hidden


  Commit: 30ff7d1d0b3484bb91385853909476d4e4b2b988
      
https://github.com/qemu/qemu/commit/30ff7d1d0b3484bb91385853909476d4e4b2b988
  Author: Peter Maydell <address@hidden>
  Date:   2017-06-19 (Mon, 19 Jun 2017)

  Changed paths:
    M configure
    M include/ui/spice-display.h
    M ui/cocoa.m
    M ui/spice-core.c
    M ui/spice-display.c
    M ui/spice-input.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20170614-1' into 
staging

ui: prefer gtk3 and sdl2, various fixes.

# gpg: Signature made Wed 14 Jun 2017 08:54:22 BST
# gpg:                using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <address@hidden>"
# gpg:                 aka "Gerd Hoffmann <address@hidden>"
# gpg:                 aka "Gerd Hoffmann (private) <address@hidden>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/pull-ui-20170614-1:
  spice: don't enter opengl mode in case another UI provides opengl support
  sdl: prefer sdl2 over sdl1
  gtk: prefer gtk3 over gtk2
  spice: Use proper enum type for kbd led state
  Improve Cocoa modifier key handling

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/cef8fd68364a...30ff7d1d0b34

reply via email to

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