From 5e2fee7fd66836bab8d6f74788917ffb4bb5c01b Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 11 Oct 2003 14:33:35 +0000 Subject: [project @ 2003-10-11 14:33:35 by jmb] Prevent lnks and form items being clicked on when they are hidden svn path=/import/netsurf/; revision=364 --- desktop/browser.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop/browser.c b/desktop/browser.c index 5fdf29639..f3b403a80 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -17,6 +17,7 @@ #include "libxml/debugXML.h" #include "netsurf/content/cache.h" #include "netsurf/content/fetchcache.h" +#include "netsurf/css/css.h" #include "netsurf/desktop/browser.h" #include "netsurf/render/box.h" #include "netsurf/render/font.h" @@ -526,6 +527,9 @@ int browser_window_gadget_click(struct browser_window* bw, unsigned long click_x for (i = found - 1; i >= 0; i--) { + if (click_boxes[i].box->style->visibility == CSS_VISIBILITY_HIDDEN) + continue; + if (click_boxes[i].box->gadget) { struct gui_gadget* g = click_boxes[i].box->gadget; @@ -1214,6 +1218,8 @@ void browser_window_follow_link(struct browser_window* bw, for (i = found - 1; i >= 0; i--) { + if (click_boxes[i].box->style->visibility == CSS_VISIBILITY_HIDDEN) + continue; if (click_boxes[i].box->href != NULL) { if (click_type == 1) -- cgit v1.2.3