ui: misc small fixes for vnc, spice and curses.

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJX16UOAAoJEEy22O7T6HE4DukP/jRtbCZA3fDsARaX4CKnvhsn
 C28dPLfOV1x1oRsTRKjTz5nJGr4Uh8oaoRx9s3+777y9EoxXdSqYrc3YP7zKAe9i
 xr64XNfm05+WRlbb5oeWaZAvXG3HhLll7Nvz7abP9ck5Bf9S7+4RURZT7jTp8abU
 7TjFgmtygGVdIH9wiTP/ZnaMafCHzUYaIKmBF3/9V+wScH2qEySN4gCtxT7m13Pw
 GJAigcDkDTl2d8cAd2DIb7ACFcAyGrNGjnu8E/k7OqUbRuQ2yrBDt32Zh6+stybP
 iT7V+9p9xexSklBI4VoVh0zmB9Ry3rTdSKrPxjTcOnu20pHLguG/Wp0e5apL/4iE
 +GRUTgBwn2Y7KAwpSWde/Ao53flV9gDOm/KfYOQ+lrvLmeJLhr+dgSKZRaUgor7A
 Iaq1E5KWxDUQQc61dqFLrld2Gb7x/xNMZz5cPw8faLsVJeAaDCgqLpQsCYMzDZtP
 3e+tGWdRaHVUYT//wpA1F9lIOxLEG8SqaI8LGsw5FxXuZSatxPHTQostM9NsXwTI
 zXtyEdfyPgZ+MUktJTaqRHLrUnQ40s1GRcA0yOm6AuYGwgPyLqDdVeMj33uCgUUD
 xhE40kDG06XrKoxvSrwRILtWAFLgruX9XL0we27iwFi17SL8ZcuIHc7WgD8XY9LE
 e+vJL785QC5PTYjwpEJ+
 =cUuo
 -----END PGP SIGNATURE-----

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

ui: misc small fixes for vnc, spice and curses.

# gpg: Signature made Tue 13 Sep 2016 08:04:46 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-20160913-1:
  vnc: fix qemu crash because of SIGSEGV
  qemu-options.hx: correct spice options streaming-video default document value to 'off'
  ui/curses.c: Clean up nextchr logic
  ui/curses.c: Ensure we don't read off the end of curses2qemu array

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2016-09-13 12:59:36 +01:00
commit e1c270c940
3 changed files with 13 additions and 13 deletions

View File

@ -1145,7 +1145,7 @@ Configure wan image compression (lossy for slow links).
Default is auto.
@item streaming-video=[off|all|filter]
Configure video stream detection. Default is filter.
Configure video stream detection. Default is off.
@item agent-mouse=[on|off]
Enable/disable passing mouse events via vdagent. Default is on.

View File

@ -181,7 +181,7 @@ static kbd_layout_t *kbd_layout = NULL;
static void curses_refresh(DisplayChangeListener *dcl)
{
int chr, nextchr, keysym, keycode, keycode_alt;
int chr, keysym, keycode, keycode_alt;
curses_winch_check();
@ -195,15 +195,9 @@ static void curses_refresh(DisplayChangeListener *dcl)
graphic_hw_text_update(NULL, screen);
nextchr = ERR;
while (1) {
/* while there are any pending key strokes to process */
if (nextchr == ERR)
chr = getch();
else {
chr = nextchr;
nextchr = ERR;
}
chr = getch();
if (chr == ERR)
break;
@ -224,13 +218,12 @@ static void curses_refresh(DisplayChangeListener *dcl)
/* alt key */
if (keycode == 1) {
nextchr = getch();
int nextchr = getch();
if (nextchr != ERR) {
chr = nextchr;
keycode_alt = ALT;
keycode = curses2keycode[nextchr];
nextchr = ERR;
keycode = curses2keycode[chr];
if (keycode != -1) {
keycode |= ALT;
@ -317,7 +310,10 @@ static void curses_refresh(DisplayChangeListener *dcl)
qemu_input_event_send_key_delay(0);
}
} else {
keysym = curses2qemu[chr];
keysym = -1;
if (chr < CURSES_KEYS) {
keysym = curses2qemu[chr];
}
if (keysym == -1)
keysym = chr;

View File

@ -911,6 +911,10 @@ static void vnc_dpy_copy(DisplayChangeListener *dcl,
}
}
if (!vd->server) {
/* no client connected */
return;
}
/* do bitblit op on the local surface too */
pitch = vnc_server_fb_stride(vd);
src_row = vnc_server_fb_ptr(vd, src_x, src_y);