From nobody Fri Nov 7 14:38:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 154808026026550.88884814969049; Mon, 21 Jan 2019 06:17:40 -0800 (PST) Received: from localhost ([127.0.0.1]:54416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glaOR-0003l9-AU for importer@patchew.org; Mon, 21 Jan 2019 09:17:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glaJ5-0008I2-KJ for qemu-devel@nongnu.org; Mon, 21 Jan 2019 09:12:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glaJ4-0000nL-Nh for qemu-devel@nongnu.org; Mon, 21 Jan 2019 09:12:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42970) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1glaJ4-0000lt-I5 for qemu-devel@nongnu.org; Mon, 21 Jan 2019 09:12:06 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C95F413821C; Mon, 21 Jan 2019 14:12:05 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0E6F5D6AA; Mon, 21 Jan 2019 14:12:02 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3D8C141AA7; Mon, 21 Jan 2019 15:11:52 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 21 Jan 2019 15:11:51 +0100 Message-Id: <20190121141152.948-6-kraxel@redhat.com> In-Reply-To: <20190121141152.948-1-kraxel@redhat.com> References: <20190121141152.948-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 21 Jan 2019 14:12:05 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 5/5] egl-helpers.h: do not depend on X11 Window type, use EGLNativeWindowType 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: Gerd Hoffmann , Alexander Kanavin Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Alexander Kanavin It was assumed that mesa provides the necessary X11 includes, but it is not always the case, as it can be configured without x11 support. Signed-off-by: Alexander Kanavin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20190116113751.17177-1-alex.kanavin@gmail.com [ kraxel: codestyle fix (long line) ] Signed-off-by: Gerd Hoffmann --- include/ui/egl-helpers.h | 2 +- ui/egl-helpers.c | 4 ++-- ui/gtk-egl.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index 9db7293bdb..3fc656a7ba 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -43,7 +43,7 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf); =20 #endif =20 -EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win); +EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType = win); =20 int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy, DisplayGLMode mode); int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode); diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 4f475142fc..5e115b3fb4 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -273,14 +273,14 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf) =20 /* ---------------------------------------------------------------------- = */ =20 -EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win) +EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType = win) { EGLSurface esurface; EGLBoolean b; =20 esurface =3D eglCreateWindowSurface(qemu_egl_display, qemu_egl_config, - (EGLNativeWindowType)win, NULL); + win, NULL); if (esurface =3D=3D EGL_NO_SURFACE) { error_report("egl: eglCreateWindowSurface failed"); return NULL; diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 5420c2362b..afd17148c0 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -54,7 +54,8 @@ void gd_egl_init(VirtualConsole *vc) } =20 vc->gfx.ectx =3D qemu_egl_init_ctx(); - vc->gfx.esurface =3D qemu_egl_init_surface_x11(vc->gfx.ectx, x11_windo= w); + vc->gfx.esurface =3D qemu_egl_init_surface_x11 + (vc->gfx.ectx, (EGLNativeWindowType)x11_window); =20 assert(vc->gfx.esurface); } --=20 2.9.3