Skip to content

Commit

Permalink
Added some SysWM bits for Mir.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 3, 2014
1 parent 8674b7a commit 6bc2977
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/SDL_syswm.h
Expand Up @@ -93,6 +93,11 @@ typedef struct _UIWindow UIWindow;
#endif
#endif

#if defined(SDL_VIDEO_DRIVER_MIR)
#include <mir_toolkit/mir_client_library.h>
#endif


/**
* These are the various supported windowing subsystems
*/
Expand Down Expand Up @@ -205,6 +210,14 @@ struct SDL_SysWMinfo
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
} wl;
#endif
#if defined(SDL_VIDEO_DRIVER_MIR)
struct
{
MirConnection *connection; /**< Mir display server connection */
MirSurface *surface; /**< Mir surface */
} mir;
#endif

/* Can't have an empty union */
int dummy;
} info;
Expand Down
4 changes: 4 additions & 0 deletions src/video/mir/SDL_mirwindow.c
Expand Up @@ -158,8 +158,12 @@ MIR_GetWindowWMInfo(_THIS, SDL_Window* window, SDL_SysWMinfo* info)
{
if (info->version.major == SDL_MAJOR_VERSION &&
info->version.minor == SDL_MINOR_VERSION) {
MIR_Window* mir_window = window->driverdata;

info->subsystem = SDL_SYSWM_MIR;
info->info.mir.connection = mir_window->mir_data->connection;
info->info.mir.surface = mir_window->surface;

return SDL_TRUE;
}

Expand Down

0 comments on commit 6bc2977

Please sign in to comment.