From 755e45028d09e161a53a164ba4aafd0507ff0d73 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 30 Oct 2010 10:43:14 +0000 Subject: If a drag is in progress that the tree can't handle, it is a TREE_UNKNOWN_DRAG not a TREE_NO_DRAG, as the platform code might be able to deal with it. svn path=/trunk/netsurf/; revision=10920 --- desktop/tree.c | 2 ++ desktop/tree.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/tree.c b/desktop/tree.c index f90b91033..8658b36c5 100644 --- a/desktop/tree.c +++ b/desktop/tree.c @@ -2167,6 +2167,7 @@ bool tree_mouse_action(struct tree *tree, browser_mouse_state mouse, int x, if (tree->flags & TREE_MOVABLE) tree->drag = TREE_MOVE_DRAG; + else tree->drag = TREE_UNKNOWN_DRAG; return true; } @@ -2411,6 +2412,7 @@ void tree_drag_end(struct tree *tree, browser_mouse_state mouse, int x0, int y0, switch (tree->drag) { case TREE_NO_DRAG: + case TREE_UNKNOWN_DRAG: break; case TREE_SELECT_DRAG: tree_handle_selection_area(tree, y0, y1 - y0, diff --git a/desktop/tree.h b/desktop/tree.h index 30d142005..aaf82af83 100644 --- a/desktop/tree.h +++ b/desktop/tree.h @@ -66,7 +66,8 @@ struct node_element; typedef enum { TREE_NO_DRAG = 0, TREE_SELECT_DRAG, - TREE_MOVE_DRAG + TREE_MOVE_DRAG, + TREE_UNKNOWN_DRAG /** < A drag the tree itself won't handle */ } tree_drag_type; typedef enum { -- cgit v1.2.3