Commit ad5a5912 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/kraxel/tags/ui-20200520-pull-request' into staging



ui: windows keyboard fixes for gtk & sdl.
ui: require GTK 3.22 or newer.

# gpg: Signature made Wed 20 May 2020 09:41:48 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20200520-pull-request:
  ui: increase min required GTK version to 3.22.0
  ui/gtk: use native keyboard scancodes on Windows
  ui/gtk: don't pass on win keys without keyboard grab
  ui/sdl2-input: use trace-events to debug key events
  ui/sdl2: start in full screen with grab enabled
  ui/sdl2: fix handling of AltGr key on Windows
  ui/gtk: remove unused variable ignore_keys
  ui/gtk: remove unused code
  ui/gkt: release all keys on grab-broken-event
  ui/gtk: fix handling of AltGr key on Windows
  ui/win32-kbd-hook: handle AltGr in a hook procedure

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 8b9112e4 7b23d121
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2897,7 +2897,7 @@ fi
if test "$gtk" != "no"; then
    gtkpackage="gtk+-3.0"
    gtkx11package="gtk+-x11-3.0"
    gtkversion="3.14.0"
    gtkversion="3.22.0"
    if $pkg_config --exists "$gtkpackage >= $gtkversion"; then
        gtk_cflags=$($pkg_config --cflags $gtkpackage)
        gtk_libs=$($pkg_config --libs $gtkpackage)
+14 −0
Original line number Diff line number Diff line
/*
 * SPDX-License-Identifier: GPL-2.0-or-later
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 */

#ifndef UI_WIN32_KBD_HOOK_H
#define UI_WIN32_KBD_HOOK_H

void win32_kbd_set_window(void *hwnd);
void win32_kbd_set_grab(bool grab);

#endif
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ stub-obj-y += trace-control.o
stub-obj-y += uuid.o
stub-obj-y += vm-stop.o
stub-obj-y += vmstate.o
stub-obj-y += win32-kbd-hook.o
stub-obj-y += fd-register.o
stub-obj-y += qmp_memory_device.o
stub-obj-y += target-monitor-defs.o

stubs/win32-kbd-hook.c

0 → 100644
+18 −0
Original line number Diff line number Diff line
/*
 * Win32 keyboard hook stubs
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or
 * (at your option) any later version.  See the COPYING file in the
 * top-level directory.
 */

#include "qemu/osdep.h"
#include "ui/win32-kbd-hook.h"

void win32_kbd_set_window(void *hwnd)
{
}

void win32_kbd_set_grab(bool grab)
{
}
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@ common-obj-$(CONFIG_SPICE) += spice-core.o spice-input.o spice-display.o
common-obj-$(CONFIG_COCOA) += cocoa.o
common-obj-$(CONFIG_VNC) += $(vnc-obj-y)
common-obj-$(call lnot,$(CONFIG_VNC)) += vnc-stubs.o
ifneq (,$(findstring m,$(CONFIG_SDL)$(CONFIG_GTK)))
common-obj-$(CONFIG_WIN32) += win32-kbd-hook.o
endif

# ui-sdl module
common-obj-$(CONFIG_SDL) += sdl.mo
Loading