From patchwork Fri Jan 13 08:14:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 9514805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 76678601E5 for ; Fri, 13 Jan 2017 08:15:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62B21284C3 for ; Fri, 13 Jan 2017 08:15:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 541C928658; Fri, 13 Jan 2017 08:15:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D7108284C3 for ; Fri, 13 Jan 2017 08:15:45 +0000 (UTC) Received: from localhost ([::1]:39746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRx1U-0005oB-8f for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 Jan 2017 03:15:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRx0f-0005Qb-Tj for qemu-devel@nongnu.org; Fri, 13 Jan 2017 03:14:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRx0d-0000Qp-0o for qemu-devel@nongnu.org; Fri, 13 Jan 2017 03:14:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54502) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRx0c-0000QQ-Rp for qemu-devel@nongnu.org; Fri, 13 Jan 2017 03:14:50 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 10551C04B332; Fri, 13 Jan 2017 08:14:50 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0D8EmQp012078; Fri, 13 Jan 2017 03:14:49 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 3C32980FFC; Fri, 13 Jan 2017 09:14:47 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 13 Jan 2017 09:14:45 +0100 Message-Id: <1484295285-8809-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 13 Jan 2017 08:14:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] sdl2: fix build failure on windows X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Weil , Gerd Hoffmann , Samuel Thibault Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Cc: Stefan Weil Cc: Samuel Thibault Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Weil --- ui/sdl2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 9a79b17..91fb111 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -817,9 +817,15 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) sdl2_console[i].dcl.con = con; register_displaychangelistener(&sdl2_console[i].dcl); +#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_X11) if (SDL_GetWindowWMInfo(sdl2_console[i].real_window, &info)) { +#if defined(SDL_VIDEO_DRIVER_WINDOWS) + qemu_console_set_window_id(con, (uintptr_t)info.info.win.window); +#elif defined(SDL_VIDEO_DRIVER_X11) qemu_console_set_window_id(con, info.info.x11.window); +#endif } +#endif } /* Load a 32x32x4 image. White pixels are transparent. */