summaryrefslogtreecommitdiff
path: root/render/html_interaction.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-10-24 17:57:15 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-10-24 17:57:15 +0100
commitb27f3e5ac46bb85f605e27516c94d64a089c66c0 (patch)
treec65c5191b89bd718bd1a1b6ff736789fa7a559ba /render/html_interaction.c
parent197f6e34f8370b983411df93f539eb4fdf4295dd (diff)
downloadnetsurf-b27f3e5ac46bb85f605e27516c94d64a089c66c0.tar.gz
netsurf-b27f3e5ac46bb85f605e27516c94d64a089c66c0.tar.bz2
Open select menu via content msg, instead of breaking encapsulation.
Fixes bw deref and browser_private.h #include in render/
Diffstat (limited to 'render/html_interaction.c')
-rw-r--r--render/html_interaction.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 7e78fc034..781c9c1de 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -55,13 +55,6 @@
#include "render/imagemap.h"
#include "render/search.h"
-/* TODO:
- * This is currently needed here because the forms stuff (select menu
- * specifically) is badly designed. But I'd rather it were here in the
- * core than in all the front ends. We should fix this so we communicate
- * with the browser window layer via the content message system. -- tlsa */
-#include <desktop/browser_private.h>
-
/**
* Get pointer shape for given box
*
@@ -665,10 +658,9 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
c);
pointer = BROWSER_POINTER_DEFAULT;
} else if (mouse & BROWSER_MOUSE_CLICK_1) {
- struct browser_window *rbw =
- browser_window_get_root(bw);
- guit->browser->create_form_select_menu(
- rbw->window, gadget);
+ msg_data.select_menu.gadget = gadget;
+ content_broadcast(c, CONTENT_MSG_SELECTMENU,
+ msg_data);
}
break;
case GADGET_CHECKBOX: