diff options
-rw-r--r-- | src/ui/documentwidget.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 7a297aa7..c9eda18f 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -2447,8 +2447,17 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
2447 | refresh_Widget(w); | 2447 | refresh_Widget(w); |
2448 | } | 2448 | } |
2449 | /* Clicking on the top/side banner navigates to site root. */ | 2449 | /* Clicking on the top/side banner navigates to site root. */ |
2450 | if (contains_Rect(siteBannerRect_DocumentWidget_(d), pos_Click(&d->click))) { | 2450 | const iRect banRect = siteBannerRect_DocumentWidget_(d); |
2451 | postCommand_Widget(d, "navigate.root"); | 2451 | if (contains_Rect(banRect, pos_Click(&d->click))) { |
2452 | /* Clicking on a warning? */ | ||
2453 | if (bannerType_DocumentWidget_(d) == certificateWarning_GmDocumentBanner && | ||
2454 | pos_Click(&d->click).y - top_Rect(banRect) > | ||
2455 | lineHeight_Text(banner_FontId) * 2) { | ||
2456 | postCommand_App("server.showcert"); | ||
2457 | } | ||
2458 | else { | ||
2459 | postCommand_Widget(d, "navigate.root"); | ||
2460 | } | ||
2452 | } | 2461 | } |
2453 | } | 2462 | } |
2454 | return iTrue; | 2463 | return iTrue; |