On 5/20/20 10:43 AM, Gerd Hoffmann wrote: > From: Volker Rümelin <vr_q...@t-online.de> > > Import win32 keyboard hooking code from project spice-gtk. This > patch removes the extra left control key up/down input events > inserted by Windows for the right alt key up/down input events > with international keyboard layouts. Additionally there's some > code to grab the keyboard. > > The next patches will use this code. > > Only Windows needs this. > > Signed-off-by: Volker Rümelin <vr_q...@t-online.de> > Message-id: 20200516072014.7766-1-vr_q...@t-online.de
This patch content doesn't match exactly the content of the message-id. There are some build-sys changes. > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > --- > include/ui/win32-kbd-hook.h | 14 +++++ > stubs/win32-kbd-hook.c | 18 +++++++ > ui/win32-kbd-hook.c | 102 ++++++++++++++++++++++++++++++++++++ > stubs/Makefile.objs | 1 + > ui/Makefile.objs | 3 ++ > 5 files changed, 138 insertions(+) > create mode 100644 include/ui/win32-kbd-hook.h > create mode 100644 stubs/win32-kbd-hook.c > create mode 100644 ui/win32-kbd-hook.c [...] > diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs > index 45be5dc0ed78..6a9e3135e8f9 100644 > --- a/stubs/Makefile.objs > +++ b/stubs/Makefile.objs > @@ -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 > diff --git a/ui/Makefile.objs b/ui/Makefile.objs > index e6da6ff047fd..504b19647977 100644 > --- a/ui/Makefile.objs > +++ b/ui/Makefile.objs > @@ -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))) If we limit this object compilation, shouldn't we also limit the stub? > +common-obj-$(CONFIG_WIN32) += win32-kbd-hook.o > +endif > > # ui-sdl module > common-obj-$(CONFIG_SDL) += sdl.mo >