mir: set last state after initializing the surface

This commit is contained in:
Marco Trevisan (Treviño) 2014-11-17 17:45:59 +01:00
parent 1b9380ef3c
commit 62f3f56d29

View File

@ -333,8 +333,6 @@ _cogl_winsys_egl_onscreen_init (CoglOnscreen *onscreen,
mir_connection_create_surface_sync (mir_renderer->mir_connection, &surfaceparm); mir_connection_create_surface_sync (mir_renderer->mir_connection, &surfaceparm);
} }
mir_onscreen->last_state = mir_surface_get_state (mir_onscreen->mir_surface);
if (!mir_surface_is_valid (mir_onscreen->mir_surface)) if (!mir_surface_is_valid (mir_onscreen->mir_surface))
{ {
_cogl_set_error (error, COGL_WINSYS_ERROR, _cogl_set_error (error, COGL_WINSYS_ERROR,
@ -359,6 +357,8 @@ _cogl_winsys_egl_onscreen_init (CoglOnscreen *onscreen,
(EGLNativeWindowType) mir_egl_native_window, (EGLNativeWindowType) mir_egl_native_window,
NULL); NULL);
mir_onscreen->last_state = mir_surface_get_state (mir_onscreen->mir_surface);
return TRUE; return TRUE;
} }