Assume all motion events are mouse events unless tool_type states otherwise.
authorBrandon Schaefer <brandon.schaefer@canonical.com>
Wed, 04 Jun 2014 12:55:18 -0700
changeset 8824c2a79f186731
parent 8823 15a1b4b8e20a
child 8825 0cb64df3fa28
Assume all motion events are mouse events unless tool_type states otherwise.
src/video/mir/SDL_mirevents.c
     1.1 --- a/src/video/mir/SDL_mirevents.c	Wed Jun 04 10:57:52 2014 -0700
     1.2 +++ b/src/video/mir/SDL_mirevents.c	Wed Jun 04 12:55:18 2014 -0700
     1.3 @@ -224,12 +224,12 @@
     1.4  {
     1.5      int cord_index;
     1.6      for (cord_index = 0; cord_index < motion.pointer_count; cord_index++) {
     1.7 -        if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_mouse) {
     1.8 +        if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
     1.9 +            HandleTouchEvent(motion, cord_index, sdl_window);
    1.10 +        }
    1.11 +        else {
    1.12              HandleMouseEvent(motion, cord_index, sdl_window);
    1.13          }
    1.14 -        else if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
    1.15 -            HandleTouchEvent(motion, cord_index, sdl_window);
    1.16 -        }
    1.17      }
    1.18  }
    1.19