From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3DaE-0000O7-QY for qemu-devel@nongnu.org; Thu, 20 Nov 2008 12:44:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3DaE-0000NO-0D for qemu-devel@nongnu.org; Thu, 20 Nov 2008 12:44:50 -0500 Received: from [199.232.76.173] (port=58290 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3DaD-0000N6-RP for qemu-devel@nongnu.org; Thu, 20 Nov 2008 12:44:49 -0500 Received: from smtp.eu.citrix.com ([62.200.22.115]:31173) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3DaD-0008Bn-HQ for qemu-devel@nongnu.org; Thu, 20 Nov 2008 12:44:49 -0500 Message-ID: <4925A2F0.6000103@eu.citrix.com> Date: Thu, 20 Nov 2008 17:48:32 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1 of 2] [UPDATE] DisplayState interface change References: <49259735.8080807@eu.citrix.com> <200811201737.00254.paul@codesourcery.com> In-Reply-To: <200811201737.00254.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org Paul Brook wrote: > On Thursday 20 November 2008, Stefano Stabellini wrote: >> Hi all, >> this patch changes the DisplayState interface adding support for >> multiple frontends at the same time (sdl and vnc) and implements most >> of the benefit of the shared_buf patch without the added complexity. > > Unless I'm misunderstanding something, isn't this all going to go horribly > wrong when we want to have multiple displays? You shouldn't be using > DisplayState at all, you should be attaching these things to QEMUConsole. > > That was the main problem I had to solve, but I managed to make it work correctly: everything is handled transparently by qemu_console_resize and console_select in console.c. If the backend is smart enought to share the buffer it does so checking that it is the current active console first (look at hw/vga.c:vga_draw_graphic, vga.c is the only "smart" backend at the moment). You can test it passing "-sdl -vnc :1" as arguments to qemu.