From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Alexander Kanavin <alex.kanavin@gmail.com>
Subject: [Qemu-devel] [PULL 5/5] egl-helpers.h: do not depend on X11 Window type, use EGLNativeWindowType
Date: Mon, 21 Jan 2019 15:11:51 +0100 [thread overview]
Message-ID: <20190121141152.948-6-kraxel@redhat.com> (raw)
In-Reply-To: <20190121141152.948-1-kraxel@redhat.com>
From: Alexander Kanavin <alex.kanavin@gmail.com>
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 <alex.kanavin@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190116113751.17177-1-alex.kanavin@gmail.com
[ kraxel: codestyle fix (long line) ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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);
#endif
-EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
+EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType win);
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)
/* ---------------------------------------------------------------------- */
-EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win)
+EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType win)
{
EGLSurface esurface;
EGLBoolean b;
esurface = eglCreateWindowSurface(qemu_egl_display,
qemu_egl_config,
- (EGLNativeWindowType)win, NULL);
+ win, NULL);
if (esurface == 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)
}
vc->gfx.ectx = qemu_egl_init_ctx();
- vc->gfx.esurface = qemu_egl_init_surface_x11(vc->gfx.ectx, x11_window);
+ vc->gfx.esurface = qemu_egl_init_surface_x11
+ (vc->gfx.ectx, (EGLNativeWindowType)x11_window);
assert(vc->gfx.esurface);
}
--
2.9.3
next prev parent reply other threads:[~2019-01-21 14:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 14:11 [Qemu-devel] [PULL 0/5] Ui 20190121 patches Gerd Hoffmann
2019-01-21 14:11 ` [Qemu-devel] [PULL 1/5] ui: install logo icons to $prefix/share/icons Gerd Hoffmann
2019-01-21 14:11 ` [Qemu-devel] [PULL 2/5] ui: fix icon display for GTK frontend under GNOME Shell with Wayland Gerd Hoffmann
2019-01-21 14:11 ` [Qemu-devel] [PULL 3/5] sdl: add support for high resolution window icon Gerd Hoffmann
2019-01-21 14:11 ` [Qemu-devel] [PULL 4/5] vnc: detect and optimize pageflips Gerd Hoffmann
2019-01-21 14:11 ` Gerd Hoffmann [this message]
2019-01-22 16:08 ` [Qemu-devel] [PULL 0/5] Ui 20190121 patches Peter Maydell
2019-01-23 8:40 ` Gerd Hoffmann
2019-01-23 21:50 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190121141152.948-6-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=alex.kanavin@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).