|
@@ -122,7 +122,6 @@ HandleMouseMotion(SDL_Window* sdl_window, int x, int y)
|
|
SDL_SendMouseMotion(sdl_window, 0, 0, x, y);
|
|
SDL_SendMouseMotion(sdl_window, 0, 0, x, y);
|
|
}
|
|
}
|
|
|
|
|
|
-#if 0 /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */
|
|
|
|
static void
|
|
static void
|
|
HandleTouchPress(int device_id, int source_id, SDL_bool down, float x, float y, float pressure)
|
|
HandleTouchPress(int device_id, int source_id, SDL_bool down, float x, float y, float pressure)
|
|
{
|
|
{
|
|
@@ -182,7 +181,6 @@ HandleTouchEvent(MirMotionEvent const motion, int cord_index, SDL_Window* sdl_wi
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-#endif
|
|
|
|
|
|
|
|
static void
|
|
static void
|
|
HandleMouseEvent(MirMotionEvent const motion, int cord_index, SDL_Window* sdl_window)
|
|
HandleMouseEvent(MirMotionEvent const motion, int cord_index, SDL_Window* sdl_window)
|
|
@@ -207,13 +205,11 @@ HandleMouseEvent(MirMotionEvent const motion, int cord_index, SDL_Window* sdl_wi
|
|
case mir_motion_action_outside:
|
|
case mir_motion_action_outside:
|
|
SDL_SetMouseFocus(NULL);
|
|
SDL_SetMouseFocus(NULL);
|
|
break;
|
|
break;
|
|
-#if 0 /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */
|
|
|
|
case mir_motion_action_scroll:
|
|
case mir_motion_action_scroll:
|
|
HandleMouseScroll(sdl_window,
|
|
HandleMouseScroll(sdl_window,
|
|
motion.pointer_coordinates[cord_index].hscroll,
|
|
motion.pointer_coordinates[cord_index].hscroll,
|
|
motion.pointer_coordinates[cord_index].vscroll);
|
|
motion.pointer_coordinates[cord_index].vscroll);
|
|
break;
|
|
break;
|
|
-#endif
|
|
|
|
case mir_motion_action_cancel:
|
|
case mir_motion_action_cancel:
|
|
case mir_motion_action_hover_enter:
|
|
case mir_motion_action_hover_enter:
|
|
case mir_motion_action_hover_exit:
|
|
case mir_motion_action_hover_exit:
|
|
@@ -228,16 +224,12 @@ HandleMotionEvent(MirMotionEvent const motion, SDL_Window* sdl_window)
|
|
{
|
|
{
|
|
int cord_index;
|
|
int cord_index;
|
|
for (cord_index = 0; cord_index < motion.pointer_count; cord_index++) {
|
|
for (cord_index = 0; cord_index < motion.pointer_count; cord_index++) {
|
|
-#if 0 /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */
|
|
|
|
if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_mouse) {
|
|
if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_mouse) {
|
|
HandleMouseEvent(motion, cord_index, sdl_window);
|
|
HandleMouseEvent(motion, cord_index, sdl_window);
|
|
}
|
|
}
|
|
else if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
|
|
else if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
|
|
HandleTouchEvent(motion, cord_index, sdl_window);
|
|
HandleTouchEvent(motion, cord_index, sdl_window);
|
|
}
|
|
}
|
|
-#else
|
|
|
|
- HandleMouseEvent(motion, cord_index, sdl_window);
|
|
|
|
-#endif
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|