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

ui: use keycodemapdb for key code mappings, part one (v2)
ui: add qemu-keymap, update reverse keymaps (for qemu -k $map)
ui: fix for vte 0.50
ui: gtk texture fix

# gpg: Signature made Mon 16 Oct 2017 14:12:49 BST
# gpg:                using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20171016-pull-request:
  gtk: fix wrong id between texture and framebuffer
  ui/gtk: Fix deprecation of vte_terminal_copy_clipboard
  pc-bios/keymaps: keymaps update
  Add pc-bios/keymaps/Makefile
  tools: add qemu-keymap
  ui: don't export qemu_input_event_new_key
  ui: convert key events to QKeyCodes immediately
  ui: convert common input code to keycodemapdb
  ui: add keycodemapdb repository as a GIT submodule
  docker: don't rely on submodules existing in the main checkout
  build: automatically handle GIT submodule checkout for dtc

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2017-10-17 10:03:33 +01:00
47 changed files with 24556 additions and 2067 deletions
+2
View File
@@ -14,6 +14,7 @@
/trace/generated-tcg-tracers.h
/ui/shader/texture-blit-frag.h
/ui/shader/texture-blit-vert.h
/ui/input-keymap-*.c
*-timestamp
/*-softmmu
/*-darwin-user
@@ -113,6 +114,7 @@
/docs/version.texi
*.tps
.stgit-*
.git-submodule-status
cscope.*
tags
TAGS
+3
View File
@@ -34,3 +34,6 @@
[submodule "roms/QemuMacDrivers"]
path = roms/QemuMacDrivers
url = git://git.qemu.org/QemuMacDrivers.git
[submodule "ui/keycodemapdb"]
path = ui/keycodemapdb
url = git://git.qemu.org/keycodemapdb.git
+6
View File
@@ -1960,3 +1960,9 @@ M: Daniel P. Berrange <berrange@redhat.com>
S: Odd Fixes
F: docs/devel/build-system.txt
Build System
------------
GIT submodules
M: Daniel P. Berrange <berrange@redhat.com>
S: Odd Fixes
F: scripts/git-submodule.sh
+53 -1
View File
@@ -14,6 +14,27 @@ ifneq ($(wildcard config-host.mak),)
all:
include config-host.mak
git-submodule-update:
.PHONY: git-submodule-update
ifeq (0,$(MAKELEVEL))
git_module_status := $(shell \
cd '$(SRC_PATH)' && \
./scripts/git-submodule.sh status $(GIT_SUBMODULES); \
echo $$?; \
)
ifeq (1,$(git_module_status))
git-submodule-update:
$(call quiet-command, \
(cd $(SRC_PATH) && ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \
"GIT","$(GIT_SUBMODULES)")
endif
endif
.git-submodule-status: git-submodule-update config-host.mak
# Check that we're not trying to do an out-of-tree build from
# a tree that's been used for an in-tree build.
ifneq ($(realpath $(SRC_PATH)),$(realpath .))
@@ -84,6 +105,7 @@ endif
GENERATED_FILES += $(TRACE_HEADERS)
GENERATED_FILES += $(TRACE_SOURCES)
GENERATED_FILES += $(BUILD_DIR)/trace-events-all
GENERATED_FILES += .git-submodule-status
trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
@@ -191,6 +213,31 @@ trace-dtrace-root.h: trace-dtrace-root.dtrace
trace-dtrace-root.o: trace-dtrace-root.dtrace
KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
KEYCODEMAP_FILES = \
ui/input-keymap-linux-to-qcode.c \
ui/input-keymap-qcode-to-qnum.c \
ui/input-keymap-qnum-to-qcode.c \
$(NULL)
GENERATED_FILES += $(KEYCODEMAP_FILES)
ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
$(call quiet-command,\
src=$$(echo $@ | sed -E -e "s,^ui/input-keymap-(.+)-to-(.+)\.c$$,\1,") && \
dst=$$(echo $@ | sed -E -e "s,^ui/input-keymap-(.+)-to-(.+)\.c$$,\2,") && \
test -e $(KEYCODEMAP_GEN) && \
$(PYTHON) $(KEYCODEMAP_GEN) \
--lang glib2 \
--varname qemu_input_map_$${src}_to_$${dst} \
code-map $(KEYCODEMAP_CSV) $${src} $${dst} \
> $@ || rm -f $@, "GEN", "$@")
$(KEYCODEMAP_GEN): .git-submodule-status
$(KEYCODEMAP_CSV): .git-submodule-status
# Don't try to regenerate Makefile or configure
# We don't generate any of them
Makefile: ;
@@ -330,7 +377,7 @@ DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_src
DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
subdir-dtc:dtc/libfdt dtc/tests
subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests
$(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
dtc/%:
@@ -371,6 +418,8 @@ qemu-io$(EXESUF): qemu-io.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj
qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS)
qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS)
fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS)
fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
@@ -385,6 +434,9 @@ qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS)
qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS)
gen-out-type = $(subst .,-,$(suffix $@))
qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
Vendored
+55 -20
View File
@@ -265,6 +265,13 @@ libs_qga=""
debug_info="yes"
stack_protector=""
if test -e "$source_path/.git"
then
git_submodules="ui/keycodemapdb"
else
git_submodules=""
fi
# Don't accept a target_list environment variable.
unset target_list
@@ -297,6 +304,7 @@ vde=""
vnc_sasl=""
vnc_jpeg=""
vnc_png=""
xkbcommon=""
xen=""
xen_ctrl_version=""
xen_pv_domain_build="no"
@@ -2900,6 +2908,21 @@ EOF
fi
fi
##########################################
# xkbcommon probe
if test "$xkbcommon" != "no" ; then
if $pkg_config xkbcommon --exists; then
xkbcommon_cflags=$($pkg_config xkbcommon --cflags)
xkbcommon_libs=$($pkg_config xkbcommon --libs)
xkbcommon=yes
else
if test "$xkbcommon" = "yes" ; then
feature_not_found "xkbcommon" "Install libxkbcommon-devel"
fi
xkbcommon=no
fi
fi
##########################################
# fnmatch() probe, used for ACL routines
fnmatch="no"
@@ -3590,27 +3613,30 @@ EOF
if compile_prog "" "$fdt_libs" ; then
# system DTC is good - use it
fdt=yes
elif test -d ${source_path}/dtc/libfdt ; then
# have submodule DTC - use it
fdt=yes
dtc_internal="yes"
mkdir -p dtc
if [ "$pwd_is_source_path" != "y" ] ; then
symlink "$source_path/dtc/Makefile" "dtc/Makefile"
symlink "$source_path/dtc/scripts" "dtc/scripts"
fi
fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
elif test "$fdt" = "yes" ; then
# have neither and want - prompt for system/submodule install
error_exit "DTC (libfdt) version >= 1.4.2 not present. Your options:" \
" (1) Preferred: Install the DTC (libfdt) devel package" \
" (2) Fetch the DTC submodule, using:" \
" git submodule update --init dtc"
else
# don't have and don't want
fdt_libs=
fdt=no
# have GIT checkout, so activate dtc submodule
if test -e "${source_path}/.git" ; then
git_submodules="${git_submodules} dtc"
fi
if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then
fdt=yes
dtc_internal="yes"
mkdir -p dtc
if [ "$pwd_is_source_path" != "y" ] ; then
symlink "$source_path/dtc/Makefile" "dtc/Makefile"
symlink "$source_path/dtc/scripts" "dtc/scripts"
fi
fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
elif test "$fdt" = "yes" ; then
# Not a git build & no libfdt found, prompt for system install
error_exit "DTC (libfdt) version >= 1.4.2 not present." \
"Please install the DTC (libfdt) devel package"
else
# don't have and don't want
fdt_libs=
fdt=no
fi
fi
fi
@@ -5103,6 +5129,9 @@ if test "$softmmu" = yes ; then
mpath=no
fi
fi
if test "$xkbcommon" = "yes"; then
tools="qemu-keymap\$(EXESUF) $tools"
fi
# Probe for guest agent support/options
@@ -5301,6 +5330,7 @@ echo "local state directory queried at runtime"
echo "Windows SDK $win_sdk"
fi
echo "Source path $source_path"
echo "GIT submodules $git_submodules"
echo "C compiler $cc"
echo "Host C compiler $host_cc"
echo "C++ compiler $cxx"
@@ -5490,6 +5520,7 @@ echo "extra_cxxflags=$EXTRA_CXXFLAGS" >> $config_host_mak
echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak
echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
echo "ARCH=$ARCH" >> $config_host_mak
@@ -5601,6 +5632,10 @@ fi
if test "$vnc_png" = "yes" ; then
echo "CONFIG_VNC_PNG=y" >> $config_host_mak
fi
if test "$xkbcommon" = "yes" ; then
echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak
echo "XKBCOMMON_LIBS=$xkbcommon_libs" >> $config_host_mak
fi
if test "$fnmatch" = "yes" ; then
echo "CONFIG_FNMATCH=y" >> $config_host_mak
fi
+10 -2
View File
@@ -38,12 +38,11 @@ void qemu_input_event_send_impl(QemuConsole *src, InputEvent *evt);
void qemu_input_event_sync(void);
void qemu_input_event_sync_impl(void);
InputEvent *qemu_input_event_new_key(KeyValue *key, bool down);
void qemu_input_event_send_key(QemuConsole *src, KeyValue *key, bool down);
void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down);
void qemu_input_event_send_key_qcode(QemuConsole *src, QKeyCode q, bool down);
void qemu_input_event_send_key_delay(uint32_t delay_ms);
int qemu_input_key_number_to_qcode(uint8_t nr);
int qemu_input_key_number_to_qcode(unsigned int nr);
int qemu_input_key_value_to_number(const KeyValue *value);
int qemu_input_key_value_to_qcode(const KeyValue *value);
int qemu_input_key_value_to_scancode(const KeyValue *value, bool down,
@@ -69,4 +68,13 @@ void qemu_input_check_mode_change(void);
void qemu_add_mouse_mode_change_notifier(Notifier *notify);
void qemu_remove_mouse_mode_change_notifier(Notifier *notify);
extern const guint qemu_input_map_linux_to_qcode_len;
extern const guint16 qemu_input_map_linux_to_qcode[];
extern const guint qemu_input_map_qcode_to_qnum_len;
extern const guint16 qemu_input_map_qcode_to_qnum[];
extern const guint qemu_input_map_qnum_to_qcode_len;
extern const guint16 qemu_input_map_qnum_to_qcode[];
#endif /* INPUT_H */
+56
View File
@@ -0,0 +1,56 @@
KEYMAP := $(shell which qemu-keymap 2>/dev/null)
MAPS := ar bepo cz da de de-ch en-us en-gb es et fi fo \
fr fr-be fr-ca fr-ch \
hr hu is it ja lt lv mk nl no pl pt pt-br ru th tr
ar : MAP_FLAGS := -l ar
bepo : MAP_FLAGS := -l fr -v dvorak
cz : MAP_FLAGS := -l cz
da : MAP_FLAGS := -l dk
de : MAP_FLAGS := -l de
de-ch : MAP_FLAGS := -l ch
en-us : MAP_FLAGS := -l us
en-gb : MAP_FLAGS := -l gb
es : MAP_FLAGS := -l es
et : MAP_FLAGS := -l et
fi : MAP_FLAGS := -l fi
fo : MAP_FLAGS := -l fo
fr : MAP_FLAGS := -l fr
fr-be : MAP_FLAGS := -l be
fr-ca : MAP_FLAGS := -l ca -v fr
fr-ch : MAP_FLAGS := -l ch -v fr
hr : MAP_FLAGS := -l hr
hu : MAP_FLAGS := -l hu
is : MAP_FLAGS := -l is
it : MAP_FLAGS := -l it
ja : MAP_FLAGS := -l jp -m jp106
lt : MAP_FLAGS := -l lt
lv : MAP_FLAGS := -l lv
mk : MAP_FLAGS := -l mk
nl : MAP_FLAGS := -l nl
no : MAP_FLAGS := -l no
pl : MAP_FLAGS := -l pl
pt : MAP_FLAGS := -l pt
pt-br : MAP_FLAGS := -l br
ru : MAP_FLAGS := -l ru
th : MAP_FLAGS := -l th
tr : MAP_FLAGS := -l tr
ifeq ($(KEYMAP),)
all:
@echo "nothing to do (qemu-keymap not found)"
else
all: $(MAPS)
clean:
rm -f $(MAPS)
$(MAPS): $(KEYMAP) Makefile
$(KEYMAP) -f $@ $(MAP_FLAGS)
endif
+737 -82
View File
File diff suppressed because it is too large Load Diff
+777 -329
View File
File diff suppressed because it is too large Load Diff
+797 -54
View File
File diff suppressed because it is too large Load Diff
+724 -8
View File
File diff suppressed because it is too large Load Diff
+746 -21
View File
File diff suppressed because it is too large Load Diff
+791 -124
View File
File diff suppressed because it is too large Load Diff
+720 -4
View File
File diff suppressed because it is too large Load Diff
+715 -3
View File
File diff suppressed because it is too large Load Diff
+737 -7
View File
File diff suppressed because it is too large Load Diff
+734 -74
View File
File diff suppressed because it is too large Load Diff
+751 -63
View File
File diff suppressed because it is too large Load Diff
+819 -58
View File
File diff suppressed because it is too large Load Diff
+681 -25
View File
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More