I think I see an error which breaks dragging.
In mouse_handler_base.cpp around line 118:
(SDL_GetMouseState(&mx,&my) & SDL_BUTTON_LEFT) != 0
SDL_GetMouseState() returns the state of ALL buttons, it's a bit mask. SDL_BUTTON_LEFT is the button ID.
I'm sure this should be
(SDL_GetMouseState(&mx,&my) & SDL_BUTTON(SDL_BUTTON_LEFT)) != 0
because SDL_BUTTON() turns button ID into a respective bit in a bit status field.
It only works for SDL_BUTTON_LEFT because SDL_BUTTON(SDL_BUTTON_LEFT) == 1 and SDL_BUTTON_LEFT == 1.
Did right-button dragging ever work? Looks like there was supposed to be left-button and right-button dragging, but now right click invokes a context menu immediately.
Was it supposed to drag a map? I would be pretty happy to use a map dragging functionality in a touch UI.