aboutsummaryrefslogtreecommitdiff
path: root/examples/idle-inhibit.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/idle-inhibit.c')
-rw-r--r--examples/idle-inhibit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/idle-inhibit.c b/examples/idle-inhibit.c
index 44a7f5b5..7037681f 100644
--- a/examples/idle-inhibit.c
+++ b/examples/idle-inhibit.c
@@ -27,12 +27,12 @@ static struct xdg_wm_base *wm_base = NULL;
static struct zwp_idle_inhibit_manager_v1 *idle_inhibit_manager = NULL;
static struct zwp_idle_inhibitor_v1 *idle_inhibitor = NULL;
-struct wlr_egl egl;
+struct wlr_egl *egl;
struct wl_egl_window *egl_window;
struct wlr_egl_surface *egl_surface;
static void draw(void) {
- eglMakeCurrent(egl.display, egl_surface, egl_surface, egl.context);
+ eglMakeCurrent(egl->display, egl_surface, egl_surface, egl->context);
float color[] = {1.0, 1.0, 0.0, 1.0};
if (idle_inhibitor) {
@@ -43,7 +43,7 @@ static void draw(void) {
glClearColor(color[0], color[1], color[2], 1.0);
glClear(GL_COLOR_BUFFER_BIT);
- eglSwapBuffers(egl.display, egl_surface);
+ eglSwapBuffers(egl->display, egl_surface);
}
static void pointer_handle_button(void *data, struct wl_pointer *pointer, uint32_t serial,
@@ -193,7 +193,7 @@ int main(int argc, char **argv) {
}
EGLint attribs[] = { EGL_NONE };
- wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs);
+ egl = wlr_egl_create(EGL_PLATFORM_WAYLAND_EXT, display, attribs);
struct wl_surface *surface = wl_compositor_create_surface(compositor);
struct xdg_surface *xdg_surface =
@@ -214,7 +214,7 @@ int main(int argc, char **argv) {
wl_surface_commit(surface);
egl_window = wl_egl_window_create(surface, width, height);
- egl_surface = wlr_egl_create_surface(&egl, egl_window);
+ egl_surface = wlr_egl_create_surface(egl, egl_window);
wl_display_roundtrip(display);