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 8824 c2a79f186731
parent 8823 15a1b4b8e20a
child 8825 0cb64df3fa28
Assume all motion events are mouse events unless tool_type states otherwise.
src/video/mir/SDL_mirevents.c
--- a/src/video/mir/SDL_mirevents.c	Wed Jun 04 10:57:52 2014 -0700
+++ b/src/video/mir/SDL_mirevents.c	Wed Jun 04 12:55:18 2014 -0700
@@ -224,11 +224,11 @@
 {
     int cord_index;
     for (cord_index = 0; cord_index < motion.pointer_count; cord_index++) {
-        if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_mouse) {
-            HandleMouseEvent(motion, cord_index, sdl_window);
+        if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
+            HandleTouchEvent(motion, cord_index, sdl_window);
         }
-        else if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
-            HandleTouchEvent(motion, cord_index, sdl_window);
+        else {
+            HandleMouseEvent(motion, cord_index, sdl_window);
         }
     }
 }