mirror of https://gitee.com/openkylin/qemu.git
ui: misc bug fixes.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJXWo62AAoJEEy22O7T6HE4wmQQANRFwrwEL0hh316aj1D8NDb0 mSiCg0tpND3QyKw2CPqVw17pWr9yoe9P+fWNIl0KKQhHSqVkINEWiXcvMVD0+ugQ T0+s7klJEqvX8ob0V7poQfbcjgB24wTPX7oGa6wRgn4VD+exIhZ+06Vws0CRwXNL r+nrVFXLO32riNcIKMMMh6Fq3GdeRbSj1oM3CEoALFON9VBwpYqk4XdsLPP5zv+5 l5E5zFBdrAaSV7QTagjFm07Zq/BIlTf3yySPSPbJIhlysdYUTrnA12EYCI0ZP1u0 ojA79YTJeVnLLFqotQBVZf7c5eINGYGCzy7vCb93Rblu7B1daEAg1eSaHQrHaGoz 5uMQIzCJliFymbzAoXk9mRNQHKgAVYzeSvc9y/c+mZRXMGTTL0525+um+LTTg/v4 9JcVm9u7n3fe1FwIBJ6lwWaf7oKv/HTP9Habmh8IddSicC92yL44YjQ4yca6utjj CTTRi/UfkqAU/Xgvn+anmuVcVLWvFV1NNsO3l+MWlgHvKtPAM+5QvlJWtHW/RU4K JBe0XxZtlS376EAyMOpcxvSLOQxiXLL5YuqbIr1zkjAsAoJ8a2waqGtI/ffcBzmF A4jiFkrZldY+ERlrVE/pFvr2R01SV+Ew108BB6Cug06y5TUYyjQsAP20288e56K6 IpiIlf6yY5bzE5se5nja =rfEC -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160610-1' into staging ui: misc bug fixes. # gpg: Signature made Fri 10 Jun 2016 10:56:06 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/pull-ui-20160610-1: console: ignore ui_info updates which don't actually update something ui/console-gl: Add support for big endian display surfaces gtk: fix vte version check ui: fix regression in printing VNC host/port on startup vnc: drop unused depth arg for set_pixel_format Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
a93c1bdf0b
|
@ -88,6 +88,11 @@ void surface_gl_create_texture(ConsoleGLState *gls,
|
|||
surface->glformat = GL_BGRA_EXT;
|
||||
surface->gltype = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case PIXMAN_BE_x8r8g8b8:
|
||||
case PIXMAN_BE_a8r8g8b8:
|
||||
surface->glformat = GL_RGBA;
|
||||
surface->gltype = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case PIXMAN_r5g6b5:
|
||||
surface->glformat = GL_RGB;
|
||||
surface->gltype = GL_UNSIGNED_SHORT_5_6_5;
|
||||
|
|
|
@ -1453,16 +1453,21 @@ bool dpy_ui_info_supported(QemuConsole *con)
|
|||
int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info)
|
||||
{
|
||||
assert(con != NULL);
|
||||
con->ui_info = *info;
|
||||
|
||||
if (!dpy_ui_info_supported(con)) {
|
||||
return -1;
|
||||
}
|
||||
if (memcmp(&con->ui_info, info, sizeof(con->ui_info)) == 0) {
|
||||
/* nothing changed -- ignore */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Typically we get a flood of these as the user resizes the window.
|
||||
* Wait until the dust has settled (one second without updates), then
|
||||
* go notify the guest.
|
||||
*/
|
||||
con->ui_info = *info;
|
||||
timer_mod(con->ui_timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + 1000);
|
||||
return 0;
|
||||
}
|
||||
|
|
2
ui/gtk.c
2
ui/gtk.c
|
@ -1748,7 +1748,7 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc,
|
|||
/* The documentation says that the default is UTF-8, but actually it is
|
||||
* 7-bit ASCII at least in VTE 0.38.
|
||||
*/
|
||||
#if VTE_CHECK_VERSION(0, 40, 0)
|
||||
#if VTE_CHECK_VERSION(0, 38, 0)
|
||||
vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8", NULL);
|
||||
#else
|
||||
vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8");
|
||||
|
|
8
ui/vnc.c
8
ui/vnc.c
|
@ -2115,8 +2115,7 @@ static void send_color_map(VncState *vs)
|
|||
}
|
||||
}
|
||||
|
||||
static void set_pixel_format(VncState *vs,
|
||||
int bits_per_pixel, int depth,
|
||||
static void set_pixel_format(VncState *vs, int bits_per_pixel,
|
||||
int big_endian_flag, int true_color_flag,
|
||||
int red_max, int green_max, int blue_max,
|
||||
int red_shift, int green_shift, int blue_shift)
|
||||
|
@ -2124,7 +2123,6 @@ static void set_pixel_format(VncState *vs,
|
|||
if (!true_color_flag) {
|
||||
/* Expose a reasonable default 256 color map */
|
||||
bits_per_pixel = 8;
|
||||
depth = 8;
|
||||
red_max = 7;
|
||||
green_max = 7;
|
||||
blue_max = 3;
|
||||
|
@ -2231,7 +2229,7 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
|
|||
if (len == 1)
|
||||
return 20;
|
||||
|
||||
set_pixel_format(vs, read_u8(data, 4), read_u8(data, 5),
|
||||
set_pixel_format(vs, read_u8(data, 4),
|
||||
read_u8(data, 6), read_u8(data, 7),
|
||||
read_u16(data, 8), read_u16(data, 10),
|
||||
read_u16(data, 12), read_u8(data, 14),
|
||||
|
@ -3225,7 +3223,7 @@ char *vnc_display_local_addr(const char *id)
|
|||
qapi_free_SocketAddress(addr);
|
||||
return NULL;
|
||||
}
|
||||
ret = g_strdup_printf("%s;%s", addr->u.inet.data->host,
|
||||
ret = g_strdup_printf("%s:%s", addr->u.inet.data->host,
|
||||
addr->u.inet.data->port);
|
||||
qapi_free_SocketAddress(addr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue