Skip to content
Permalink
Browse files

Mir 14.04 headers available that allow scroll + touch events.

  • Loading branch information
BrandonSchaefer committed Apr 19, 2014
1 parent dd27ebe commit 2540214e0677864130adb68f4c6b6c4542d6d7a4
Showing with 0 additions and 9 deletions.
  1. +0 −8 src/video/mir/SDL_mirevents.c
  2. +0 −1 src/video/mir/SDL_mirvideo.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
}
}

@@ -82,7 +82,6 @@ MIR_Available()
/* !!! FIXME: try to make a MirConnection here. */
available = 1;
SDL_MIR_UnloadSymbols();

}

return available;

0 comments on commit 2540214

Please sign in to comment.