configure: don't warn on old sdl/gtk versions if disabled.
keymap + gtk fixes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJazIKZAAoJEEy22O7T6HE4ZkwQAJVic5+tGJEOj9enjE0uoRiK sQBqG23AFZIHFBrWTjNggAuzEC4beHdXY9U5ZuMgq2MAvuj5fQ8Qggb/x8NOHW97 sUY/Hwo/OpBKicus4nK37yxtpyQ8CP3+TSC0t7r6P39AKbwVXzUSHAWd6qm1ggmj +NpcTCVjuy1SHJGLzholw3KYz/+Aeqm1elgKwpCyw7HM3NNQwnVi5Lnochg5F6eT WXz4yDhCwvHSKgKBpBV9Dy5CKoODFmEJ/HISyj4Y46sGM24tezL2SbIYbRb0mCmH LCnY1V2S5+LquVaOLV398PsICwNzNLv5lUVmvcVqelOAx4jxLvHclhTzEM3gkHum 3TgQdSNKr4MoW2MpTG9/B88WsoFoNe/fR5fQWPo/5pOm9QSXaqrtaSTKnP/ca/63 YcDZulvn9mniRM4GdyV7dt6ZZ9p+5NWJdJIO3f+MIAzZMJHlpM7FKf1Lo4IbZpgV YbFLqiVnqUMdODPAloYFvf1qzQwq57CPZFNztBypNBpHUZQESire+ucvIXuhvD6n 1Ss+YNCYohkRbv3wqXpyS+38J1qqATwpLuhCUqdmYj7Jh5Jqw7/kam+N8mkNRttP WONbl1iaiEVSDtyV7+5Z6w0+Ow1fJtM3qkelPJpkBHoQPI+BLQbMnz4nuzTQlbiD A4CKlElN2E/zGc6QT273 =Gqvp -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180410-pull-request' into staging configure: don't warn on old sdl/gtk versions if disabled. keymap + gtk fixes. # gpg: Signature made Tue 10 Apr 2018 10:23:37 BST # gpg: using RSA key 4CB6D8EED3E87138 # 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-20180410-pull-request: configure: don't warn SDL abi if disabled configure: don't warn GTK if disabled gtk: drop pointless code from gd_window_close ui: fix keymap detection under Xwayland Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
df6378eb0e
|
@ -2540,6 +2540,7 @@ fi
|
||||||
##########################################
|
##########################################
|
||||||
# GTK probe
|
# GTK probe
|
||||||
|
|
||||||
|
if test "$gtk" != "no"; then
|
||||||
if test "$gtkabi" = ""; then
|
if test "$gtkabi" = ""; then
|
||||||
# The GTK ABI was not specified explicitly, so try whether 3.0 is available.
|
# The GTK ABI was not specified explicitly, so try whether 3.0 is available.
|
||||||
# Use 2.0 as a fallback if that is available.
|
# Use 2.0 as a fallback if that is available.
|
||||||
|
@ -2551,8 +2552,6 @@ if test "$gtkabi" = ""; then
|
||||||
gtkabi=3.0
|
gtkabi=3.0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$gtk" != "no"; then
|
|
||||||
gtkpackage="gtk+-$gtkabi"
|
gtkpackage="gtk+-$gtkabi"
|
||||||
gtkx11package="gtk+-x11-$gtkabi"
|
gtkx11package="gtk+-x11-$gtkabi"
|
||||||
if test "$gtkabi" = "3.0" ; then
|
if test "$gtkabi" = "3.0" ; then
|
||||||
|
@ -2836,6 +2835,9 @@ fi
|
||||||
# Look for sdl configuration program (pkg-config or sdl-config). Try
|
# Look for sdl configuration program (pkg-config or sdl-config). Try
|
||||||
# sdl-config even without cross prefix, and favour pkg-config over sdl-config.
|
# sdl-config even without cross prefix, and favour pkg-config over sdl-config.
|
||||||
|
|
||||||
|
sdl_probe ()
|
||||||
|
{
|
||||||
|
sdl_too_old=no
|
||||||
if test "$sdlabi" = ""; then
|
if test "$sdlabi" = ""; then
|
||||||
if $pkg_config --exists "sdl2"; then
|
if $pkg_config --exists "sdl2"; then
|
||||||
sdlabi=2.0
|
sdlabi=2.0
|
||||||
|
@ -2872,13 +2874,13 @@ else
|
||||||
feature_not_found "sdl" "Install SDL2-devel"
|
feature_not_found "sdl" "Install SDL2-devel"
|
||||||
fi
|
fi
|
||||||
sdl=no
|
sdl=no
|
||||||
|
# no need to do the rest
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
if test -n "$cross_prefix" && test "$(basename "$sdlconfig")" = sdl-config; then
|
if test -n "$cross_prefix" && test "$(basename "$sdlconfig")" = sdl-config; then
|
||||||
echo warning: using "\"$sdlconfig\"" to detect cross-compiled sdl >&2
|
echo warning: using "\"$sdlconfig\"" to detect cross-compiled sdl >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sdl_too_old=no
|
|
||||||
if test "$sdl" != "no" ; then
|
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#undef main /* We don't want SDL to override our main() */
|
#undef main /* We don't want SDL to override our main() */
|
||||||
|
@ -2920,6 +2922,10 @@ EOF
|
||||||
fi
|
fi
|
||||||
sdl=no
|
sdl=no
|
||||||
fi # sdl compile test
|
fi # sdl compile test
|
||||||
|
}
|
||||||
|
|
||||||
|
if test "$sdl" != "no" ; then
|
||||||
|
sdl_probe
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$sdl" = "yes" ; then
|
if test "$sdl" = "yes" ; then
|
||||||
|
|
8
ui/gtk.c
8
ui/gtk.c
|
@ -786,21 +786,13 @@ static gboolean gd_window_close(GtkWidget *widget, GdkEvent *event,
|
||||||
{
|
{
|
||||||
GtkDisplayState *s = opaque;
|
GtkDisplayState *s = opaque;
|
||||||
bool allow_close = true;
|
bool allow_close = true;
|
||||||
int i;
|
|
||||||
|
|
||||||
if (s->opts->has_window_close && !s->opts->window_close) {
|
if (s->opts->has_window_close && !s->opts->window_close) {
|
||||||
allow_close = false;
|
allow_close = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allow_close) {
|
if (allow_close) {
|
||||||
for (i = 0; i < s->nb_vcs; i++) {
|
|
||||||
if (s->vc[i].type != GD_VC_GFX) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
unregister_displaychangelistener(&s->vc[i].gfx.dcl);
|
|
||||||
}
|
|
||||||
qmp_quit(NULL);
|
qmp_quit(NULL);
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "ui/input.h"
|
#include "ui/input.h"
|
||||||
|
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
static gboolean check_for_xwin(Display *dpy)
|
static gboolean check_for_xwin(Display *dpy)
|
||||||
{
|
{
|
||||||
|
@ -87,11 +88,13 @@ const guint16 *qemu_xkeymap_mapping_table(Display *dpy, size_t *maplen)
|
||||||
trace_xkeymap_keymap("xquartz");
|
trace_xkeymap_keymap("xquartz");
|
||||||
*maplen = qemu_input_map_xorgxquartz_to_qcode_len;
|
*maplen = qemu_input_map_xorgxquartz_to_qcode_len;
|
||||||
return qemu_input_map_xorgxquartz_to_qcode;
|
return qemu_input_map_xorgxquartz_to_qcode;
|
||||||
} else if (keycodes && g_str_has_prefix(keycodes, "evdev")) {
|
} else if ((keycodes && g_str_has_prefix(keycodes, "evdev")) ||
|
||||||
|
(XKeysymToKeycode(dpy, XK_Page_Up) == 0x70)) {
|
||||||
trace_xkeymap_keymap("evdev");
|
trace_xkeymap_keymap("evdev");
|
||||||
*maplen = qemu_input_map_xorgevdev_to_qcode_len;
|
*maplen = qemu_input_map_xorgevdev_to_qcode_len;
|
||||||
return qemu_input_map_xorgevdev_to_qcode;
|
return qemu_input_map_xorgevdev_to_qcode;
|
||||||
} else if (keycodes && g_str_has_prefix(keycodes, "xfree86")) {
|
} else if ((keycodes && g_str_has_prefix(keycodes, "xfree86")) ||
|
||||||
|
(XKeysymToKeycode(dpy, XK_Page_Up) == 0x63)) {
|
||||||
trace_xkeymap_keymap("kbd");
|
trace_xkeymap_keymap("kbd");
|
||||||
*maplen = qemu_input_map_xorgkbd_to_qcode_len;
|
*maplen = qemu_input_map_xorgkbd_to_qcode_len;
|
||||||
return qemu_input_map_xorgkbd_to_qcode;
|
return qemu_input_map_xorgkbd_to_qcode;
|
||||||
|
|
Loading…
Reference in New Issue