diff --git a/cogl/cogl/winsys/cogl-winsys-egl-private.h b/cogl/cogl/winsys/cogl-winsys-egl-private.h index a29026813..96b49f808 100644 --- a/cogl/cogl/winsys/cogl-winsys-egl-private.h +++ b/cogl/cogl/winsys/cogl-winsys-egl-private.h @@ -169,8 +169,6 @@ typedef struct _CoglOnscreenEGL { EGLSurface egl_surface; - gboolean pending_resize_notify; - /* Platform specific data */ void *platform; } CoglOnscreenEGL; diff --git a/cogl/cogl/winsys/cogl-winsys-egl-x11.c b/cogl/cogl/winsys/cogl-winsys-egl-x11.c index cec9a0f2d..92e3871ce 100644 --- a/cogl/cogl/winsys/cogl-winsys-egl-x11.c +++ b/cogl/cogl/winsys/cogl-winsys-egl-x11.c @@ -60,6 +60,8 @@ typedef struct _CoglDisplayXlib typedef struct _CoglOnscreenXlib { Window xwin; + + gboolean pending_resize_notify; } CoglOnscreenXlib; #ifdef EGL_KHR_image_pixmap @@ -103,11 +105,12 @@ flush_pending_resize_notifications_cb (void *data, { CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer); CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen); + CoglOnscreenXlib *xlib_onscreen = egl_onscreen->platform; - if (egl_onscreen->pending_resize_notify) + if (xlib_onscreen->pending_resize_notify) { _cogl_onscreen_notify_resize (onscreen); - egl_onscreen->pending_resize_notify = FALSE; + xlib_onscreen->pending_resize_notify = FALSE; } } } @@ -140,6 +143,7 @@ notify_resize (CoglContext *context, CoglOnscreen *onscreen = find_onscreen_for_xid (context, drawable); CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen); CoglOnscreenEGL *egl_onscreen; + CoglOnscreenXlib *xlib_onscreen; if (!onscreen) return; @@ -160,7 +164,8 @@ notify_resize (CoglContext *context, NULL); } - egl_onscreen->pending_resize_notify = TRUE; + xlib_onscreen = egl_onscreen->platform; + xlib_onscreen->pending_resize_notify = TRUE; } static CoglFilterReturn