diff options
Diffstat (limited to 'src/egl/wayland/wayland-egl')
-rw-r--r-- | src/egl/wayland/wayland-egl/wayland-egl-priv.h | 3 | ||||
-rw-r--r-- | src/egl/wayland/wayland-egl/wayland-egl.c | 5 |
2 files changed, 8 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 bdbf32a1689..da25be9f710 100644 --- a/src/egl/wayland/wayland-egl/wayland-egl-priv.h +++ b/src/egl/wayland/wayland-egl/wayland-egl-priv.h @@ -24,6 +24,9 @@ struct wl_egl_window { int attached_width; int attached_height; + + void *private; + void (*resize_callback)(struct wl_egl_window *, void *); }; #ifdef __cplusplus diff --git a/src/egl/wayland/wayland-egl/wayland-egl.c b/src/egl/wayland/wayland-egl/wayland-egl.c index c61fb4f2c3a..8bd49cf6c4f 100644 --- a/src/egl/wayland/wayland-egl/wayland-egl.c +++ b/src/egl/wayland/wayland-egl/wayland-egl.c @@ -13,6 +13,9 @@ wl_egl_window_resize(struct wl_egl_window *egl_window, egl_window->height = height; egl_window->dx = dx; egl_window->dy = dy; + + if (egl_window->resize_callback) + egl_window->resize_callback(egl_window, egl_window->private); } WL_EGL_EXPORT struct wl_egl_window * @@ -26,6 +29,8 @@ wl_egl_window_create(struct wl_surface *surface, return NULL; egl_window->surface = surface; + egl_window->private = NULL; + egl_window->resize_callback = NULL; wl_egl_window_resize(egl_window, width, height, 0, 0); egl_window->attached_width = 0; egl_window->attached_height = 0; |