Added some SysWM bits for Mir.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 02 Feb 2014 23:53:48 -0500
changeset 8155cf0eda3f5e35
parent 8154 ea6b25de67b6
child 8156 d88db77c637e
Added some SysWM bits for Mir.
include/SDL_syswm.h
src/video/mir/SDL_mirwindow.c
     1.1 --- a/include/SDL_syswm.h	Sun Feb 02 23:54:10 2014 -0500
     1.2 +++ b/include/SDL_syswm.h	Sun Feb 02 23:53:48 2014 -0500
     1.3 @@ -93,6 +93,11 @@
     1.4  #endif
     1.5  #endif
     1.6  
     1.7 +#if defined(SDL_VIDEO_DRIVER_MIR)
     1.8 +#include <mir_toolkit/mir_client_library.h>
     1.9 +#endif
    1.10 +
    1.11 +
    1.12  /**
    1.13   *  These are the various supported windowing subsystems
    1.14   */
    1.15 @@ -205,6 +210,14 @@
    1.16              struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
    1.17          } wl;
    1.18  #endif
    1.19 +#if defined(SDL_VIDEO_DRIVER_MIR)
    1.20 +        struct
    1.21 +        {
    1.22 +            MirConnection *connection;  /**< Mir display server connection */
    1.23 +            MirSurface *surface;  /**< Mir surface */
    1.24 +        } mir;
    1.25 +#endif
    1.26 +
    1.27          /* Can't have an empty union */
    1.28          int dummy;
    1.29      } info;
     2.1 --- a/src/video/mir/SDL_mirwindow.c	Sun Feb 02 23:54:10 2014 -0500
     2.2 +++ b/src/video/mir/SDL_mirwindow.c	Sun Feb 02 23:53:48 2014 -0500
     2.3 @@ -158,8 +158,12 @@
     2.4  {
     2.5      if (info->version.major == SDL_MAJOR_VERSION &&
     2.6          info->version.minor == SDL_MINOR_VERSION) {
     2.7 +        MIR_Window* mir_window = window->driverdata;
     2.8  
     2.9          info->subsystem = SDL_SYSWM_MIR;
    2.10 +        info->info.mir.connection = mir_window->mir_data->connection;
    2.11 +        info->info.mir.surface = mir_window->surface;
    2.12 +
    2.13          return SDL_TRUE;
    2.14      }
    2.15