Merge patch for bug 2750. Thanks Sylvain!
authorBrandon Schaefer <brandon.schaefer@canonical.com>
Fri, 24 Oct 2014 06:50:09 -0700
changeset 9185 43f4122e1268
parent 9184 741700a12835
child 9186 5effc05df87d
Merge patch for bug 2750. Thanks Sylvain!
src/video/mir/SDL_mirsym.h
src/video/mir/SDL_mirwindow.c
--- a/src/video/mir/SDL_mirsym.h	Fri Oct 24 11:53:34 2014 +0200
+++ b/src/video/mir/SDL_mirsym.h	Fri Oct 24 06:50:09 2014 -0700
@@ -26,7 +26,7 @@
 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(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)
--- a/src/video/mir/SDL_mirwindow.c	Fri Oct 24 11:53:34 2014 +0200
+++ b/src/video/mir/SDL_mirwindow.c	Fri Oct 24 06:50:09 2014 -0700
@@ -186,9 +186,9 @@
         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 @@
     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 @@
     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 @@
     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 */