diff options
Diffstat (limited to 'src/egl/wayland/wayland-egl')
-rw-r--r-- | src/egl/wayland/wayland-egl/wayland-egl-priv.h | 1 | ||||
-rw-r--r-- | src/egl/wayland/wayland-egl/wayland-egl.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/wayland/wayland-egl/wayland-egl-priv.h b/src/egl/wayland/wayland-egl/wayland-egl-priv.h index f1e3ba2..c91f9cd 100644 --- a/src/egl/wayland/wayland-egl/wayland-egl-priv.h +++ b/src/egl/wayland/wayland-egl/wayland-egl-priv.h @@ -27,6 +27,7 @@ struct wl_egl_window { void *private; void (*resize_callback)(struct wl_egl_window *, void *); + void (*destroy_window_callback)(void *); }; #ifdef __cplusplus diff --git a/src/egl/wayland/wayland-egl/wayland-egl.c b/src/egl/wayland/wayland-egl/wayland-egl.c index 80a5be5..4a4701a 100644 --- a/src/egl/wayland/wayland-egl/wayland-egl.c +++ b/src/egl/wayland/wayland-egl/wayland-egl.c @@ -66,6 +66,7 @@ wl_egl_window_create(struct wl_surface *surface, egl_window->surface = surface; egl_window->private = NULL; egl_window->resize_callback = NULL; + egl_window->destroy_window_callback = NULL; wl_egl_window_resize(egl_window, width, height, 0, 0); egl_window->attached_width = 0; egl_window->attached_height = 0; @@ -76,6 +77,8 @@ wl_egl_window_create(struct wl_surface *surface, WL_EGL_EXPORT void wl_egl_window_destroy(struct wl_egl_window *egl_window) { + if (egl_window->destroy_window_callback) + egl_window->destroy_window_callback(egl_window->private); free(egl_window); } |