From 2540214e0677864130adb68f4c6b6c4542d6d7a4 Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Sat, 19 Apr 2014 00:31:02 -0700 Subject: [PATCH] Mir 14.04 headers available that allow scroll + touch events. --- src/video/mir/SDL_mirevents.c | 8 -------- src/video/mir/SDL_mirvideo.c | 1 - 2 files changed, 9 deletions(-) diff --git a/src/video/mir/SDL_mirevents.c b/src/video/mir/SDL_mirevents.c index 940d5b796..208431dd0 100644 --- a/src/video/mir/SDL_mirevents.c +++ b/src/video/mir/SDL_mirevents.c @@ -122,7 +122,6 @@ HandleMouseMotion(SDL_Window* sdl_window, int x, int 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 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; } } -#endif static void 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: SDL_SetMouseFocus(NULL); break; -#if 0 /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */ case mir_motion_action_scroll: HandleMouseScroll(sdl_window, motion.pointer_coordinates[cord_index].hscroll, motion.pointer_coordinates[cord_index].vscroll); break; -#endif case mir_motion_action_cancel: case mir_motion_action_hover_enter: case mir_motion_action_hover_exit: @@ -228,16 +224,12 @@ HandleMotionEvent(MirMotionEvent const motion, SDL_Window* sdl_window) { int 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) { HandleMouseEvent(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); -#endif } } diff --git a/src/video/mir/SDL_mirvideo.c b/src/video/mir/SDL_mirvideo.c index ad6de151b..8ffd17260 100644 --- a/src/video/mir/SDL_mirvideo.c +++ b/src/video/mir/SDL_mirvideo.c @@ -82,7 +82,6 @@ MIR_Available() /* !!! FIXME: try to make a MirConnection here. */ available = 1; SDL_MIR_UnloadSymbols(); - } return available;