talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit d4170e674a04910babb0e592e93441f5af53429f
parent fd6149254aaebd40e2ac74d8c2c6f1a54d71d0f3
Author: Jonathan Boeing <jonathan@claws-mail.org>
Date:   Tue, 10 Oct 2023 00:09:12 -0700

Sync with api changes

Diffstat:
Msrc/plugins/litehtml_viewer/lh_widget.cpp | 16+---------------
Msrc/plugins/litehtml_viewer/lh_widget.h | 1-
2 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp @@ -375,20 +375,6 @@ const char *lh_widget::get_href_at(litehtml::element::ptr element) const return el->get_attr("href"); } -const char *lh_widget::get_href_at(const gint x, const gint y) const -{ - litehtml::element::ptr over_el, el; - - if (m_html == NULL) - return NULL; - - over_el = m_html->root()->get_element_by_point(x, y, x, y); - if (over_el == NULL) - return NULL; - - return get_href_at(over_el); -} - void lh_widget::print() { debug_print("lh_widget print\n"); @@ -512,7 +498,7 @@ static gboolean button_press_event(GtkWidget *widget, GdkEventButton *event, /* Right-click */ if (event->button == 3) { - const char *url = w->get_href_at((gint)event->x, (gint)event->y); + const char *url = w->get_href_at(w->m_html->over_element()); if (url != NULL) w->popup_context_menu(url, event); diff --git a/src/plugins/litehtml_viewer/lh_widget.h b/src/plugins/litehtml_viewer/lh_widget.h @@ -60,7 +60,6 @@ class lh_widget : public container_linux void print(); const char *get_href_at(litehtml::element::ptr element) const; - const char *get_href_at(const gint x, const gint y) const; void popup_context_menu(const char *url, GdkEventButton *event); const litehtml::string fullurl(const char *url) const;