summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-22 11:31:19 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-22 11:31:19 +0100
commit278ddb34b39252751788113e4971f2eda1e8d79b (patch)
treecc1a272379913cd352952f4d5d9011bfcb1e5335 /desktop
parent18c10ea706584e2432f120c4ea7c187f5c957c5f (diff)
downloadnetsurf-278ddb34b39252751788113e4971f2eda1e8d79b.tar.gz
netsurf-278ddb34b39252751788113e4971f2eda1e8d79b.tar.bz2
treeview: Do not cancel selection when mouseovering search box
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/treeview.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 1d632bb63..6ef922a99 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -4674,9 +4674,7 @@ treeview_mouse_action(treeview *tree, browser_mouse_state mouse, int x, int y)
textarea_mouse_action(tree->edit.textarea, mouse,
x - tree->edit.x, y - tree->edit.y);
return;
- } else if (tree->drag.type == TV_DRAG_SEARCH ||
- (y < search_height &&
- tree->drag.type == TV_DRAG_NONE)) {
+ } else if (tree->drag.type == TV_DRAG_SEARCH) {
if (tree->search.active == false) {
tree->search.active = true;
if (treeview_clear_selection(tree, &r)) {
@@ -4688,6 +4686,16 @@ treeview_mouse_action(treeview *tree, browser_mouse_state mouse, int x, int y)
y);
return;
} else if (mouse & (BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_PRESS_2) &&
+ y < search_height && tree->search.active == false) {
+ tree->search.active = true;
+ if (treeview_clear_selection(tree, &r)) {
+ treeview__cw_invalidate_area(tree, &r);
+ }
+ textarea_mouse_action(tree->search.textarea, mouse,
+ x - tree_g.window_padding - tree_g.icon_size,
+ y);
+ return;
+ } else if (mouse & (BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_PRESS_2) &&
tree->search.active == true) {
tree->search.active = false;