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

Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20170110-1' into staging



gtk,vnc: misc bugfixes.
kbd: add jp keys, fix ps2 regressions.
sdl: export window id for baum, remove sdl hooks from baum.
egl: egl-helpers.c license change.

# gpg: Signature made Tue 10 Jan 2017 07:16:05 GMT
# 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/pull-ui-20170110-1:
  ps2: Fix lost scancodes by recent changes
  curses: Fix compiler warnings (Mingw-w64 redefinition of macro KEY_EVENT)
  ui/vnc: Fix problem with sending too many bytes as server name
  gtk: avoid oob array access
  egl-helpers: Change file licensing to LGPLv2
  sdl2: set window ID
  console: move window ID code from baum to sdl
  console: add API to get underlying gui window ID
  ui: use evdev keymap when running under wayland
  ui/gtk: fix crash at startup when no console is available

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 41a0e547 e9346441
Loading
Loading
Loading
Loading
+8 −23
Original line number Diff line number Diff line
@@ -27,12 +27,10 @@
#include "sysemu/char.h"
#include "qemu/timer.h"
#include "hw/usb.h"
#include "ui/console.h"
#include <brlapi.h>
#include <brlapi_constants.h>
#include <brlapi_keycodes.h>
#ifdef CONFIG_SDL
#include <SDL_syswm.h>
#endif

#if 0
#define DPRINTF(fmt, ...) \
@@ -227,12 +225,8 @@ static const uint8_t nabcc_translation[2][256] = {
/* The guest OS has started discussing with us, finish initializing BrlAPI */
static int baum_deferred_init(BaumDriverState *baum)
{
#if defined(CONFIG_SDL)
#if SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)
    SDL_SysWMinfo info;
#endif
#endif
    int tty;
    int tty = BRLAPI_TTY_DEFAULT;
    QemuConsole *con;

    if (baum->deferred_init) {
        return 1;
@@ -243,21 +237,12 @@ static int baum_deferred_init(BaumDriverState *baum)
        return 0;
    }

#if defined(CONFIG_SDL)
#if SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)
    memset(&info, 0, sizeof(info));
    SDL_VERSION(&info.version);
    if (SDL_GetWMInfo(&info)) {
        tty = info.info.x11.wmwindow;
    } else {
#endif
#endif
    con = qemu_console_lookup_by_index(0);
    if (con && qemu_console_is_graphic(con)) {
        tty = qemu_console_get_window_id(con);
        if (tty == -1)
            tty = BRLAPI_TTY_DEFAULT;
#if defined(CONFIG_SDL)
#if SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)
    }
#endif
#endif

    if (brlapi__enterTtyMode(baum->brlapi, tty, NULL) == -1) {
        brlapi_perror("baum: brlapi__enterTtyMode");
+10 −0
Original line number Diff line number Diff line
@@ -252,6 +252,9 @@ static const uint16_t qcode_to_keycode_set1[Q_KEY_CODE__MAX] = {
    [Q_KEY_CODE_ASTERISK] = 0x37,
    [Q_KEY_CODE_LESS] = 0x56,
    [Q_KEY_CODE_RO] = 0x73,
    [Q_KEY_CODE_HIRAGANA] = 0x70,
    [Q_KEY_CODE_HENKAN] = 0x79,
    [Q_KEY_CODE_YEN] = 0x7d,
    [Q_KEY_CODE_KP_COMMA] = 0x7e,
};

@@ -394,6 +397,9 @@ static const uint16_t qcode_to_keycode_set2[Q_KEY_CODE__MAX] = {
    [Q_KEY_CODE_LESS] = 0x61,
    [Q_KEY_CODE_SYSRQ] = 0x7f,
    [Q_KEY_CODE_RO] = 0x51,
    [Q_KEY_CODE_HIRAGANA] = 0x13,
    [Q_KEY_CODE_HENKAN] = 0x64,
    [Q_KEY_CODE_YEN] = 0x6a,
    [Q_KEY_CODE_KP_COMMA] = 0x6d,
};

@@ -504,6 +510,10 @@ static const uint16_t qcode_to_keycode_set3[Q_KEY_CODE__MAX] = {
    [Q_KEY_CODE_COMMA] = 0x41,
    [Q_KEY_CODE_DOT] = 0x49,
    [Q_KEY_CODE_SLASH] = 0x4a,

    [Q_KEY_CODE_HIRAGANA] = 0x87,
    [Q_KEY_CODE_HENKAN] = 0x86,
    [Q_KEY_CODE_YEN] = 0x5d,
};

static uint8_t translate_table[256] = {
+7 −0
Original line number Diff line number Diff line
@@ -337,7 +337,10 @@ static inline pixman_format_code_t surface_format(DisplaySurface *s)
}

#ifdef CONFIG_CURSES
/* KEY_EVENT is defined in wincon.h and in curses.h. Avoid redefinition. */
#undef KEY_EVENT
#include <curses.h>
#undef KEY_EVENT
typedef chtype console_ch_t;
extern chtype vga_to_curses[];
#else
@@ -394,6 +397,10 @@ uint32_t qemu_console_get_head(QemuConsole *con);
QemuUIInfo *qemu_console_get_ui_info(QemuConsole *con);
int qemu_console_get_width(QemuConsole *con, int fallback);
int qemu_console_get_height(QemuConsole *con, int fallback);
/* Return the low-level window id for the console */
int qemu_console_get_window_id(QemuConsole *con);
/* Set the low-level window id for the console */
void qemu_console_set_window_id(QemuConsole *con, int window_id);

void console_select(unsigned int index);
void qemu_console_resize(QemuConsole *con, int width, int height);
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,10 @@
#include <X11/XKBlib.h>
#endif

#ifdef GDK_WINDOWING_WAYLAND
#include <gdk/gdkwayland.h>
#endif

#if defined(CONFIG_OPENGL)
#include "ui/egl-helpers.h"
#include "ui/egl-context.h"
+5 −1
Original line number Diff line number Diff line
@@ -3618,6 +3618,9 @@
# @kp_comma: since 2.4
# @kp_equals: since 2.6
# @power: since 2.6
# @hiragana: since 2.9
# @henkan: since 2.9
# @yen: since 2.9
#
# An enumeration of key name.
#
@@ -3642,7 +3645,8 @@
            'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
            'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
            'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
            'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
            'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
            'ro', 'hiragana', 'henkan', 'yen',
            'kp_comma', 'kp_equals', 'power' ] }

##
Loading