Merge patch for bug 2750. Thanks Sylvain!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
diff --git a/src/video/mir/SDL_mirsym.h b/src/video/mir/SDL_mirsym.h
index fe495e3..1f8359b 100644
--- a/src/video/mir/SDL_mirsym.h
+++ b/src/video/mir/SDL_mirsym.h
@@ -26,7 +26,7 @@ SDL_MIR_SYM(MirDisplayConfiguration*,mir_connection_create_display_config,(MirCo
SDL_MIR_SYM(MirSurface *,mir_connection_create_surface_sync,(MirConnection *connection, MirSurfaceParameters const *params))
SDL_MIR_SYM(void,mir_connection_get_available_surface_formats,(MirConnection* connection, MirPixelFormat* formats, unsigned const int format_size, unsigned int *num_valid_formats))
SDL_MIR_SYM(MirEGLNativeDisplayType,mir_connection_get_egl_native_display,(MirConnection *connection))
-SDL_MIR_SYM(int,mir_connection_is_valid,(MirConnection *connection))
+SDL_MIR_SYM(MirBool,mir_connection_is_valid,(MirConnection *connection))
SDL_MIR_SYM(void,mir_connection_release,(MirConnection *connection))
SDL_MIR_SYM(MirConnection *,mir_connect_sync,(char const *server, char const *app_name))
SDL_MIR_SYM(void,mir_display_config_destroy,(MirDisplayConfiguration* display_configuration))
@@ -34,10 +34,11 @@ SDL_MIR_SYM(MirEGLNativeWindowType,mir_surface_get_egl_native_window,(MirSurface
SDL_MIR_SYM(char const *,mir_surface_get_error_message,(MirSurface *surface))
SDL_MIR_SYM(void,mir_surface_get_graphics_region,(MirSurface *surface, MirGraphicsRegion *graphics_region))
SDL_MIR_SYM(void,mir_surface_get_parameters,(MirSurface *surface, MirSurfaceParameters *parameters))
-SDL_MIR_SYM(int,mir_surface_is_valid,(MirSurface *surface))
+SDL_MIR_SYM(MirBool,mir_surface_is_valid,(MirSurface *surface))
SDL_MIR_SYM(void,mir_surface_release_sync,(MirSurface *surface))
SDL_MIR_SYM(void,mir_surface_set_event_handler,(MirSurface *surface, MirEventDelegate const *event_handler))
SDL_MIR_SYM(MirWaitHandle*,mir_surface_set_type,(MirSurface *surface, MirSurfaceType type))
+SDL_MIR_SYM(MirWaitHandle*,mir_surface_set_state,(MirSurface *surface, MirSurfaceState state))
SDL_MIR_SYM(void,mir_surface_swap_buffers_sync,(MirSurface *surface))
SDL_MIR_MODULE(XKBCOMMON)
diff --git a/src/video/mir/SDL_mirwindow.c b/src/video/mir/SDL_mirwindow.c
index cb8f1cb..6c9641c 100644
--- a/src/video/mir/SDL_mirwindow.c
+++ b/src/video/mir/SDL_mirwindow.c
@@ -186,9 +186,9 @@ MIR_SetWindowFullscreen(_THIS, SDL_Window* window,
return;
if (fullscreen) {
- MIR_mir_surface_set_type(mir_window->surface, mir_surface_state_fullscreen);
+ MIR_mir_surface_set_state(mir_window->surface, mir_surface_state_fullscreen);
} else {
- MIR_mir_surface_set_type(mir_window->surface, mir_surface_state_restored);
+ MIR_mir_surface_set_state(mir_window->surface, mir_surface_state_restored);
}
}
@@ -200,7 +200,7 @@ MIR_MaximizeWindow(_THIS, SDL_Window* window)
if (IsSurfaceValid(mir_window) < 0)
return;
- MIR_mir_surface_set_type(mir_window->surface, mir_surface_state_maximized);
+ MIR_mir_surface_set_state(mir_window->surface, mir_surface_state_maximized);
}
void
@@ -211,7 +211,7 @@ MIR_MinimizeWindow(_THIS, SDL_Window* window)
if (IsSurfaceValid(mir_window) < 0)
return;
- MIR_mir_surface_set_type(mir_window->surface, mir_surface_state_minimized);
+ MIR_mir_surface_set_state(mir_window->surface, mir_surface_state_minimized);
}
void
@@ -222,7 +222,7 @@ MIR_RestoreWindow(_THIS, SDL_Window * window)
if (IsSurfaceValid(mir_window) < 0)
return;
- MIR_mir_surface_set_type(mir_window->surface, mir_surface_state_restored);
+ MIR_mir_surface_set_state(mir_window->surface, mir_surface_state_restored);
}
#endif /* SDL_VIDEO_DRIVER_MIR */