Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEVYX-0005Rv-Dy for qemu-devel@nongnu.org; Mon, 14 Jan 2008 15:05:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEVYV-0005Rj-Qu for qemu-devel@nongnu.org; Mon, 14 Jan 2008 15:05:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEVYV-0005RZ-LF for qemu-devel@nongnu.org; Mon, 14 Jan 2008 15:05:11 -0500 Received: from 0xc2c0b63d.fbbft3nxf1.bf-dhcp.tele.dk ([194.192.182.61] helo=smtp.hotelhot.dk) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEVYV-0003kP-Aj for qemu-devel@nongnu.org; Mon, 14 Jan 2008 15:05:11 -0500 Received: from smtp.hotelhot.dk (localhost [127.0.0.1]) by smtp.hotelhot.dk (Postfix) with ESMTP id DC8CF14179 for ; Mon, 14 Jan 2008 21:05:07 +0100 (CET) Received: from kalibalik.dk (dylle.kalibalik.dk [192.168.0.251]) by smtp.hotelhot.dk (Postfix) with SMTP id CDA7114177 for ; Mon, 14 Jan 2008 21:05:06 +0100 (CET) Subject: Re: [Qemu-devel] qemu vnc.c References: From: Anders Melchiorsen Date: Mon, 14 Jan 2008 21:05:07 +0100 In-Reply-To: (Andrzej Zaborowski's message of "Sun, 13 Jan 2008 23:51:53 +0000") Message-ID: <87ir1wxjf0.fsf@dylle.kalibalik.dk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --=-=-= Andrzej Zaborowski writes: > Log message: > Reduce redundant timer ticks in VNC, by Anders Melchiorsen. > > CVSWeb URLs: > http://cvs.savannah.gnu.org/viewcvs/qemu/vnc.c?cvsroot=qemu&r1=1.31&r2=1.32 That is great, thanks. However, I have found a small error in the original patch. An additional vga_hw_update() is needed when accepting the VNC connection. Without this fix, resolution changes are not caught while no client is connected, and the display can be clipped when reconnecting. I am also resending my patch for disabling VGA refresh with -nographic Cheers, Anders. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=qemu-vnc-update-on-accept.diff diff --git a/vnc.c b/vnc.c index b5921a3..64889de 100644 --- a/vnc.c +++ b/vnc.c @@ -1904,6 +1904,9 @@ static void vnc_listen_read(void *opaque) struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); + /* Catch-up */ + vga_hw_update(); + vs->csock = accept(vs->lsock, (struct sockaddr *)&addr, &addrlen); if (vs->csock != -1) { VNC_DEBUG("New client on socket %d\n", vs->csock); --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=qemu-disable-dummy-vga-refresh.patch diff --git a/qemu/vl.c b/qemu/vl.c index 30c9537..8d67314 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -4902,13 +4902,6 @@ static void dumb_resize(DisplayState *ds, int w, int h) { } -static void dumb_refresh(DisplayState *ds) -{ -#if defined(CONFIG_SDL) - vga_hw_update(); -#endif -} - static void dumb_display_init(DisplayState *ds) { ds->data = NULL; @@ -4916,7 +4909,7 @@ static void dumb_display_init(DisplayState *ds) ds->depth = 0; ds->dpy_update = dumb_update; ds->dpy_resize = dumb_resize; - ds->dpy_refresh = dumb_refresh; + ds->dpy_refresh = NULL; } /***********************************************************/ --=-=-=--