Skip to content

Commit

Permalink
Mir 14.04 headers available that allow scroll + touch events.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonSchaefer committed Apr 19, 2014
1 parent dd27ebe commit 2540214
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
8 changes: 0 additions & 8 deletions src/video/mir/SDL_mirevents.c
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand All @@ -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:
Expand All @@ -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
}
}

Expand Down
1 change: 0 additions & 1 deletion src/video/mir/SDL_mirvideo.c
Expand Up @@ -82,7 +82,6 @@ MIR_Available()
/* !!! FIXME: try to make a MirConnection here. */
available = 1;
SDL_MIR_UnloadSymbols();

}

return available;
Expand Down

0 comments on commit 2540214

Please sign in to comment.