From patchwork Mon Aug 3 15:10:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 30600 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 408BCB6F31 for ; Tue, 4 Aug 2009 03:18:48 +1000 (EST) Received: from localhost ([127.0.0.1]:40903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MY1BN-00029p-6T for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2009 13:18:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXzAa-0004LG-JB for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:09:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXzAU-0004KS-Mf for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:09:47 -0400 Received: from [199.232.76.173] (port=40234 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXzAT-0004KN-Nf for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:09:42 -0400 Received: from smtp.eu.citrix.com ([62.200.22.115]:47712) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXzAT-0000ey-AP for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:09:41 -0400 X-IronPort-AV: E=Sophos;i="4.43,315,1246838400"; d="scan'208";a="6472528" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP; 03 Aug 2009 15:09:39 +0000 Received: from kaball.uk.xensource.com (10.80.2.59) by smtprelay.citirx.com (10.30.224.162) with Microsoft SMTP Server id 8.1.358.0; Mon, 3 Aug 2009 16:09:39 +0100 Date: Mon, 3 Aug 2009 16:10:43 +0100 From: Stefano Stabellini X-X-Sender: sstabellini@kaball-desktop To: qemu-devel@nongnu.org Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH] fix sdl window resize X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hi all, this patch fixes the sdl window resize event handler so that it doesn't require the emulated graphic card (or console.c) to call qemu_console_resize. Signed-off-by: Stefano Stabellini Tested-by: Luiz Capitulino --- sdl.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/sdl.c b/sdl.c index 50a4a01..823afbb 100644 --- a/sdl.c +++ b/sdl.c @@ -720,6 +720,10 @@ static void sdl_refresh(DisplayState *ds) bpp = 32; do_sdl_resize(rev->w, rev->h, bpp); scaling_active = 1; + if (!is_buffer_shared(ds->surface)) { + ds->surface = qemu_resize_displaysurface(ds, ds_get_width(ds), ds_get_height(ds)); + dpy_resize(ds); + } vga_hw_invalidate(); vga_hw_update(); break;