src/video/mir/SDL_mirvideo.c
changeset 10089 25fda20d0173
parent 9998 f67cf37e9cd4
child 10181 b82c0f22d22a
     1.1 --- a/src/video/mir/SDL_mirvideo.c	Sun Feb 21 17:21:29 2016 -0500
     1.2 +++ b/src/video/mir/SDL_mirvideo.c	Sun Feb 21 15:19:35 2016 -0800
     1.3 @@ -27,13 +27,13 @@
     1.4  
     1.5  #if SDL_VIDEO_DRIVER_MIR
     1.6  
     1.7 +#include "SDL_mirwindow.h"
     1.8  #include "SDL_video.h"
     1.9  
    1.10  #include "SDL_mirframebuffer.h"
    1.11  #include "SDL_mirmouse.h"
    1.12  #include "SDL_miropengl.h"
    1.13  #include "SDL_mirvideo.h"
    1.14 -#include "SDL_mirwindow.h"
    1.15  
    1.16  #include "SDL_mirdyn.h"
    1.17  
    1.18 @@ -146,29 +146,29 @@
    1.19      device->GL_GetProcAddress  = MIR_GL_GetProcAddress;
    1.20  
    1.21      /* mirwindow */
    1.22 -    device->CreateWindow        = MIR_CreateWindow;
    1.23 -    device->DestroyWindow       = MIR_DestroyWindow;
    1.24 -    device->GetWindowWMInfo     = MIR_GetWindowWMInfo;
    1.25 -    device->SetWindowFullscreen = MIR_SetWindowFullscreen;
    1.26 -    device->MaximizeWindow      = MIR_MaximizeWindow;
    1.27 -    device->MinimizeWindow      = MIR_MinimizeWindow;
    1.28 -    device->RestoreWindow       = MIR_RestoreWindow;
    1.29 +    device->CreateWindow         = MIR_CreateWindow;
    1.30 +    device->DestroyWindow        = MIR_DestroyWindow;
    1.31 +    device->GetWindowWMInfo      = MIR_GetWindowWMInfo;
    1.32 +    device->SetWindowFullscreen  = MIR_SetWindowFullscreen;
    1.33 +    device->MaximizeWindow       = MIR_MaximizeWindow;
    1.34 +    device->MinimizeWindow       = MIR_MinimizeWindow;
    1.35 +    device->RestoreWindow        = MIR_RestoreWindow;
    1.36 +    device->ShowWindow           = MIR_RestoreWindow;
    1.37 +    device->HideWindow           = MIR_HideWindow;
    1.38 +    device->SetWindowSize        = MIR_SetWindowSize;
    1.39 +    device->SetWindowMinimumSize = MIR_SetWindowMinimumSize;
    1.40 +    device->SetWindowMaximumSize = MIR_SetWindowMaximumSize;
    1.41 +    device->SetWindowTitle       = MIR_SetWindowTitle;
    1.42  
    1.43      device->CreateWindowFrom     = NULL;
    1.44 -    device->SetWindowTitle       = NULL;
    1.45      device->SetWindowIcon        = NULL;
    1.46 -    device->SetWindowPosition    = NULL;
    1.47 -    device->SetWindowSize        = NULL;
    1.48 -    device->SetWindowMinimumSize = NULL;
    1.49 -    device->SetWindowMaximumSize = NULL;
    1.50 -    device->ShowWindow           = NULL;
    1.51 -    device->HideWindow           = NULL;
    1.52      device->RaiseWindow          = NULL;
    1.53      device->SetWindowBordered    = NULL;
    1.54      device->SetWindowGammaRamp   = NULL;
    1.55      device->GetWindowGammaRamp   = NULL;
    1.56      device->SetWindowGrab        = NULL;
    1.57      device->OnWindowEnter        = NULL;
    1.58 +    device->SetWindowPosition    = NULL;
    1.59  
    1.60      /* mirframebuffer */
    1.61      device->CreateWindowFramebuffer  = MIR_CreateWindowFramebuffer;
    1.62 @@ -272,8 +272,10 @@
    1.63  {
    1.64      MIR_Data* mir_data = _this->driverdata;
    1.65  
    1.66 -    mir_data->connection = MIR_mir_connect_sync(NULL, __PRETTY_FUNCTION__);
    1.67 -    mir_data->software = SDL_FALSE;
    1.68 +    mir_data->connection     = MIR_mir_connect_sync(NULL, __PRETTY_FUNCTION__);
    1.69 +    mir_data->current_window = NULL;
    1.70 +    mir_data->software       = SDL_FALSE;
    1.71 +    mir_data->pixel_format   = mir_pixel_format_invalid;
    1.72  
    1.73      if (!MIR_mir_connection_is_valid(mir_data->connection))
    1.74          return SDL_SetError("Failed to connect to the Mir Server");