diff options
author | Simon Ser <contact@emersion.fr> | 2021-01-04 11:30:30 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-01-04 11:30:30 +0100 |
commit | 198560fc1fe5e09f539c278b190eaf44b1402deb (patch) | |
tree | c3f43ba304519312879c61153dffb34b8c822830 /examples | |
parent | 9714638f3b521e10dc4649d62be41f6a5771ee38 (diff) |
examples: request an EGL config
Client examples using wlr_egl would fail with EGL_BAD_CONFIG because they
need an EGL config. Set the config attribs to a non-NULL value to make
sure wlr_egl creates an EGL config.
Fixes: 037710b1d428 ("render/egl: support config-less wlr_egl")
Diffstat (limited to 'examples')
-rw-r--r-- | examples/idle-inhibit.c | 3 | ||||
-rw-r--r-- | examples/input-inhibitor.c | 3 | ||||
-rw-r--r-- | examples/keyboard-shortcuts-inhibit.c | 3 | ||||
-rw-r--r-- | examples/pointer-constraints.c | 3 | ||||
-rw-r--r-- | examples/relative-pointer-unstable-v1.c | 3 | ||||
-rw-r--r-- | examples/text-input.c | 4 | ||||
-rw-r--r-- | examples/toplevel-decoration.c | 3 |
7 files changed, 14 insertions, 8 deletions
diff --git a/examples/idle-inhibit.c b/examples/idle-inhibit.c index dafaad4a..829da851 100644 --- a/examples/idle-inhibit.c +++ b/examples/idle-inhibit.c @@ -192,7 +192,8 @@ int main(int argc, char **argv) { return EXIT_FAILURE; } - wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0); + EGLint attribs[] = { EGL_NONE }; + wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0); struct wl_surface *surface = wl_compositor_create_surface(compositor); struct xdg_surface *xdg_surface = diff --git a/examples/input-inhibitor.c b/examples/input-inhibitor.c index fe726e0b..06aa4142 100644 --- a/examples/input-inhibitor.c +++ b/examples/input-inhibitor.c @@ -157,7 +157,8 @@ int main(int argc, char **argv) { input_inhibit_manager); assert(input_inhibitor); - wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0); + EGLint attribs[] = { EGL_NONE }; + wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0); struct wl_surface *surface = wl_compositor_create_surface(compositor); assert(surface); diff --git a/examples/keyboard-shortcuts-inhibit.c b/examples/keyboard-shortcuts-inhibit.c index bc90f7b4..8551973c 100644 --- a/examples/keyboard-shortcuts-inhibit.c +++ b/examples/keyboard-shortcuts-inhibit.c @@ -224,7 +224,8 @@ int main(int argc, char **argv) { return EXIT_FAILURE; } - wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0); + EGLint attribs[] = { EGL_NONE }; + wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0); struct wl_surface *surface = wl_compositor_create_surface(compositor); struct xdg_surface *xdg_surface = diff --git a/examples/pointer-constraints.c b/examples/pointer-constraints.c index 3dedfb0a..19b28e98 100644 --- a/examples/pointer-constraints.c +++ b/examples/pointer-constraints.c @@ -211,7 +211,8 @@ int main(int argc, char **argv) { wl_region_add(joint_region, 256, 256, 256, 256); regions[REGION_TYPE_JOINT] = joint_region; - wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0); + EGLint attribs[] = { EGL_NONE }; + wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0); struct wl_surface *surface = wl_compositor_create_surface(compositor); struct xdg_surface *xdg_surface = diff --git a/examples/relative-pointer-unstable-v1.c b/examples/relative-pointer-unstable-v1.c index 4df94d03..b6e56f84 100644 --- a/examples/relative-pointer-unstable-v1.c +++ b/examples/relative-pointer-unstable-v1.c @@ -443,7 +443,8 @@ int main(int argc, char **argv) { e->egl = calloc(1, sizeof(struct wlr_egl)); e->width = e->height = 512; - wlr_egl_init(e->egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0); + EGLint attribs[] = { EGL_NONE }; + wlr_egl_init(e->egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0); /* Create the surface and xdg_toplevels, and set listeners */ diff --git a/examples/text-input.c b/examples/text-input.c index 6f555a67..cc89cbf4 100644 --- a/examples/text-input.c +++ b/examples/text-input.c @@ -363,8 +363,8 @@ int main(int argc, char **argv) { zwp_text_input_v3_add_listener(text_input, &text_input_listener, NULL); - - wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0); + EGLint attribs[] = { EGL_NONE }; + wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0); struct wl_surface *surface = wl_compositor_create_surface(compositor); struct xdg_surface *xdg_surface = diff --git a/examples/toplevel-decoration.c b/examples/toplevel-decoration.c index 3fb90d18..4f309feb 100644 --- a/examples/toplevel-decoration.c +++ b/examples/toplevel-decoration.c @@ -218,7 +218,8 @@ int main(int argc, char **argv) { return EXIT_FAILURE; } - wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0); + EGLint attribs[] = { EGL_NONE }; + wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0); struct wl_surface *surface = wl_compositor_create_surface(compositor); struct xdg_surface *xdg_surface = |