提交 e1c270c9 编写于 作者: P Peter Maydell

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: NPeter Maydell <peter.maydell@linaro.org>
......@@ -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.
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册