From 04dbc4920e70062124dc8689bf7f6519f75d351c Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Fri, 24 Oct 2014 06:50:09 -0700 Subject: [PATCH] Merge patch for bug 2750. Thanks Sylvain! --- src/video/mir/SDL_mirsym.h | 5 +++-- src/video/mir/SDL_mirwindow.c | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/video/mir/SDL_mirsym.h b/src/video/mir/SDL_mirsym.h index fe495e3e5..1f8359bea 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 cb8f1cb5f..6c9641c0c 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 */