From patchwork Tue Dec 10 04:05:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 299274 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A86F22C00A7 for ; Tue, 10 Dec 2013 15:09:19 +1100 (EST) Received: from localhost ([::1]:47093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqEdJ-0002mh-2V for incoming@patchwork.ozlabs.org; Mon, 09 Dec 2013 23:09:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqEaL-0006yf-BN for qemu-devel@nongnu.org; Mon, 09 Dec 2013 23:06:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqEaF-0006B3-9z for qemu-devel@nongnu.org; Mon, 09 Dec 2013 23:06:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqEaF-0006Ay-1d for qemu-devel@nongnu.org; Mon, 09 Dec 2013 23:06:07 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBA466mY028420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 9 Dec 2013 23:06:06 -0500 Received: from dreadlord-bne-redhat-com.bne.redhat.com (dhcp-40-7.bne.redhat.com [10.64.40.7]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBA460lW024007 for ; Mon, 9 Dec 2013 23:06:05 -0500 From: Dave Airlie To: qemu-devel@nongnu.org Date: Tue, 10 Dec 2013 14:05:53 +1000 Message-Id: <1386648358-25892-4-git-send-email-airlied@gmail.com> In-Reply-To: <1386648358-25892-1-git-send-email-airlied@gmail.com> References: <1386648358-25892-1-git-send-email-airlied@gmail.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/8] sdl2: add display notify change support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Dave Airlie this adds support for the callbacks from the console layer, when the gpu changes the layouts. Signed-off-by: Dave Airlie --- ui/sdl2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 2eb3e9c..dd8cd2b 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -880,6 +880,15 @@ static void sdl_mouse_define(DisplayChangeListener *dcl, SDL_SetCursor(guest_sprite); } +static void sdl_notify_state(DisplayChangeListener *dcl, + int x, int y, uint32_t width, uint32_t height) +{ + struct sdl2_console_state *scon = container_of(dcl, struct sdl2_console_state, dcl); + + scon->x = x; + scon->y = y; +} + static void sdl_cleanup(void) { if (guest_sprite) @@ -894,6 +903,7 @@ static const DisplayChangeListenerOps dcl_ops = { .dpy_refresh = sdl_refresh, .dpy_mouse_set = sdl_mouse_warp, .dpy_cursor_define = sdl_mouse_define, + .dpy_notify_state = sdl_notify_state, }; void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)