summaryrefslogtreecommitdiff
path: root/content/handlers
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-11-17 10:12:37 +0000
committerVincent Sanders <vince@kyllikki.org>2019-11-17 10:12:37 +0000
commitae39b9f9551f39a07780453832fdf229fdea3552 (patch)
tree34d06ed3c8a52d6090fff70367572d5caa6df55a /content/handlers
parent2d57934be8a46dadd5b149e66acc0477bea8b975 (diff)
downloadnetsurf-ae39b9f9551f39a07780453832fdf229fdea3552.tar.gz
netsurf-ae39b9f9551f39a07780453832fdf229fdea3552.tar.bz2
move more select menu handling into mouse_action_select_menu()
Diffstat (limited to 'content/handlers')
-rw-r--r--content/handlers/html/interaction.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/content/handlers/html/interaction.c b/content/handlers/html/interaction.c
index 930c79593..f238341f7 100644
--- a/content/handlers/html/interaction.c
+++ b/content/handlers/html/interaction.c
@@ -334,9 +334,16 @@ mouse_action_select_menu(html_content *html,
const char *status;
int width, height;
struct hlcache_handle *bw_content;
+ browser_drag_type bw_drag_type;
assert(html->visible_select_menu != NULL);
+ bw_drag_type = browser_window_get_drag_type(bw);
+ if (bw_drag_type != DRAGGING_NONE && !mouse) {
+ /* drag end: select menu */
+ form_select_mouse_drag_end(html->visible_select_menu, mouse, x, y);
+ }
+
box = html->visible_select_menu->box;
box_coords(box, &box_x, &box_y);
@@ -542,7 +549,6 @@ html_mouse_action(struct content *c,
plot_font_style_t fstyle;
int scroll_mouse_x = 0, scroll_mouse_y = 0;
int padding_left, padding_right, padding_top, padding_bottom;
- browser_drag_type drag_type = browser_window_get_drag_type(bw);
union content_msg_data msg_data;
struct dom_node *node = html->layout->node; /* Default to the <HTML> */
union html_selection_owner sel_owner;
@@ -552,13 +558,6 @@ html_mouse_action(struct content *c,
nserror res = NSERROR_OK;
- if (drag_type != DRAGGING_NONE && !mouse &&
- html->visible_select_menu != NULL) {
- /* drag end: select menu */
- form_select_mouse_drag_end(html->visible_select_menu,
- mouse, x, y);
- }
-
if (html->visible_select_menu != NULL) {
return mouse_action_select_menu(html, bw, mouse, x, y);
}