MIR: Fix system cursors. Been broken since custom cursor support was added!
authorBrandon Schaefer <brandon.schaefer@canonical.com>
Wed, 13 Jul 2016 07:07:08 -0700
changeset 101923a5779b13f69
parent 10191 4c5c73f91e49
child 10193 75cd0fc3fec2
MIR: Fix system cursors. Been broken since custom cursor support was added!
src/video/mir/SDL_mirmouse.c
src/video/mir/SDL_mirsym.h
     1.1 --- a/src/video/mir/SDL_mirmouse.c	Sat Jul 09 22:06:00 2016 +0200
     1.2 +++ b/src/video/mir/SDL_mirmouse.c	Wed Jul 13 07:07:08 2016 -0700
     1.3 @@ -137,8 +137,8 @@
     1.4  MIR_CreateSystemCursor(SDL_SystemCursor id)
     1.5  {
     1.6      char const* cursor_name = NULL;
     1.7 -    MirCursorConfiguration* conf;
     1.8 -    SDL_Cursor* cursor = MIR_CreateDefaultCursor();
     1.9 +    SDL_Cursor* cursor      = MIR_CreateDefaultCursor();
    1.10 +    MIR_Cursor* mir_cursor  = (MIR_Cursor*)cursor->driverdata;
    1.11  
    1.12      if (!cursor) {
    1.13          return NULL;
    1.14 @@ -188,9 +188,7 @@
    1.15              return NULL;
    1.16      }
    1.17  
    1.18 -    conf = MIR_mir_cursor_configuration_from_name(cursor_name);
    1.19 -
    1.20 -    cursor->driverdata = conf;
    1.21 +    mir_cursor->conf = MIR_mir_cursor_configuration_from_name(cursor_name);
    1.22  
    1.23      return cursor;
    1.24  }
    1.25 @@ -226,12 +224,12 @@
    1.26              MIR_Cursor* mir_cursor = (MIR_Cursor*)cursor->driverdata;
    1.27  
    1.28              if (mir_cursor->conf) {
    1.29 -                MIR_mir_wait_for(MIR_mir_surface_configure_cursor(mir_window->surface, mir_cursor->conf));
    1.30 +                MIR_mir_surface_configure_cursor(mir_window->surface, mir_cursor->conf);
    1.31              }
    1.32          }
    1.33      }
    1.34      else if(mir_window && MIR_mir_surface_is_valid(mir_window->surface)) {
    1.35 -        MIR_mir_wait_for(MIR_mir_surface_configure_cursor(mir_window->surface, NULL));
    1.36 +        MIR_mir_surface_configure_cursor(mir_window->surface, NULL);
    1.37      }
    1.38      
    1.39      return 0;
     2.1 --- a/src/video/mir/SDL_mirsym.h	Sat Jul 09 22:06:00 2016 +0200
     2.2 +++ b/src/video/mir/SDL_mirsym.h	Wed Jul 13 07:07:08 2016 -0700
     2.3 @@ -91,7 +91,6 @@
     2.4  SDL_MIR_SYM(MirCursorConfiguration*,mir_cursor_configuration_from_name,(char const* cursor_name))
     2.5  SDL_MIR_SYM(MirWaitHandle*,mir_surface_configure_cursor,(MirSurface* surface, MirCursorConfiguration const* conf))
     2.6  SDL_MIR_SYM(void,mir_cursor_configuration_destroy,(MirCursorConfiguration* conf))
     2.7 -SDL_MIR_SYM(void,mir_wait_for,(MirWaitHandle* handle))
     2.8  SDL_MIR_SYM(int,mir_resize_event_get_width,(MirResizeEvent const* resize_event))
     2.9  SDL_MIR_SYM(int,mir_resize_event_get_height,(MirResizeEvent const* resize_event))
    2.10  SDL_MIR_SYM(char const*,mir_connection_get_error_message,(MirConnection* connection))