Mir 14.04 headers available that allow scroll + touch events.
authorBrandon Schaefer <brandon.schaefer@canonical.com>
Sat, 19 Apr 2014 00:31:02 -0700
changeset 8723cfc134c9c369
parent 8722 9203a56e7ffc
child 8724 9fa8abe556d7
Mir 14.04 headers available that allow scroll + touch events.
src/video/mir/SDL_mirevents.c
src/video/mir/SDL_mirvideo.c
     1.1 --- a/src/video/mir/SDL_mirevents.c	Sat Apr 19 02:26:12 2014 -0400
     1.2 +++ b/src/video/mir/SDL_mirevents.c	Sat Apr 19 00:31:02 2014 -0700
     1.3 @@ -122,7 +122,6 @@
     1.4      SDL_SendMouseMotion(sdl_window, 0, 0, x, y);
     1.5  }
     1.6  
     1.7 -#if 0  /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */
     1.8  static void
     1.9  HandleTouchPress(int device_id, int source_id, SDL_bool down, float x, float y, float pressure)
    1.10  {
    1.11 @@ -182,7 +181,6 @@
    1.12              break;
    1.13      }
    1.14  }
    1.15 -#endif
    1.16  
    1.17  static void
    1.18  HandleMouseEvent(MirMotionEvent const motion, int cord_index, SDL_Window* sdl_window)
    1.19 @@ -207,13 +205,11 @@
    1.20          case mir_motion_action_outside:
    1.21              SDL_SetMouseFocus(NULL);
    1.22              break;
    1.23 -#if 0  /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */
    1.24          case mir_motion_action_scroll:
    1.25              HandleMouseScroll(sdl_window,
    1.26                                motion.pointer_coordinates[cord_index].hscroll,
    1.27                                motion.pointer_coordinates[cord_index].vscroll);
    1.28              break;
    1.29 -#endif
    1.30          case mir_motion_action_cancel:
    1.31          case mir_motion_action_hover_enter:
    1.32          case mir_motion_action_hover_exit:
    1.33 @@ -228,16 +224,12 @@
    1.34  {
    1.35      int cord_index;
    1.36      for (cord_index = 0; cord_index < motion.pointer_count; cord_index++) {
    1.37 -#if 0  /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */
    1.38          if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_mouse) {
    1.39              HandleMouseEvent(motion, cord_index, sdl_window);
    1.40          }
    1.41          else if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
    1.42              HandleTouchEvent(motion, cord_index, sdl_window);
    1.43          }
    1.44 -#else
    1.45 -        HandleMouseEvent(motion, cord_index, sdl_window);
    1.46 -#endif
    1.47      }
    1.48  }
    1.49  
     2.1 --- a/src/video/mir/SDL_mirvideo.c	Sat Apr 19 02:26:12 2014 -0400
     2.2 +++ b/src/video/mir/SDL_mirvideo.c	Sat Apr 19 00:31:02 2014 -0700
     2.3 @@ -82,7 +82,6 @@
     2.4          /* !!! FIXME: try to make a MirConnection here. */
     2.5          available = 1;
     2.6          SDL_MIR_UnloadSymbols();
     2.7 -
     2.8      }
     2.9  
    2.10      return available;