Don't give up on a mouse action because BROWSER_MOUSE_PRESS_{1|2} is set. The RISC OS front end sets them for action-on-button-press (rather than release) behaviour.

svn path=/trunk/netsurf/; revision=11065
This commit is contained in:
Michael Drake 2010-12-15 21:58:01 +00:00
parent 95870c95dd
commit cbe24279f8

View File

@ -2107,9 +2107,9 @@ bool tree_mouse_action(struct tree *tree, browser_mouse_state mouse, int x,
y1 = tree->editing->box.y + tree->editing->box.height; y1 = tree->editing->box.y + tree->editing->box.height;
if (tree->textarea_drag_start && if (tree->textarea_drag_start &&
(mouse & (BROWSER_MOUSE_HOLDING_1 | (mouse & (BROWSER_MOUSE_HOLDING_1 |
BROWSER_MOUSE_HOLDING_2))) { BROWSER_MOUSE_HOLDING_2))) {
/* Track the drag path */
textarea_mouse_action(tree->textarea, mouse, textarea_mouse_action(tree->textarea, mouse,
x - x0, y - y0); x - x0, y - y0);
return true; return true;
@ -2118,12 +2118,15 @@ bool tree_mouse_action(struct tree *tree, browser_mouse_state mouse, int x,
if ((x >= x0) && (x < x1) && (y >= y0) && (y < y1)) { if ((x >= x0) && (x < x1) && (y >= y0) && (y < y1)) {
/* Inside the textarea */
if (mouse & (BROWSER_MOUSE_DRAG_1 | if (mouse & (BROWSER_MOUSE_DRAG_1 |
BROWSER_MOUSE_DRAG_2)) BROWSER_MOUSE_DRAG_2)) {
/* Drag starting */
tree->textarea_drag_start = true; tree->textarea_drag_start = true;
else } else {
/* Other action */
tree->textarea_drag_start = false; tree->textarea_drag_start = false;
}
textarea_mouse_action(tree->textarea, mouse, textarea_mouse_action(tree->textarea, mouse,
x - x0, y - y0); x - x0, y - y0);
return true; return true;
@ -2133,9 +2136,8 @@ bool tree_mouse_action(struct tree *tree, browser_mouse_state mouse, int x,
tree->textarea_drag_start = false; tree->textarea_drag_start = false;
/* we are not interested in the drag path or in mouse presses, return */ /* we are not interested in the drag path, return */
if (mouse & (BROWSER_MOUSE_HOLDING_1 | BROWSER_MOUSE_HOLDING_2 | if (mouse & (BROWSER_MOUSE_HOLDING_1 | BROWSER_MOUSE_HOLDING_2))
BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_PRESS_2))
return true; return true;
/* cancel edit */ /* cancel edit */