Add a getter for litehtml::document's m_over_element member
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 10 Apr 2019 19:12:57 +0000 (21:12 +0200)
committerJonathan Boeing <jonathan@claws-mail.org>
Tue, 14 Sep 2021 00:01:17 +0000 (17:01 -0700)
This allows us to avoid some expensive GDK calls in
lh_widget::set_cursor().

(cherry picked from commit 7c6693d7085636df23c44d1b40895f0e43c1f166)

src/plugins/litehtml_viewer/litehtml/document.h

index a5c152c38a1c828c0210fa79ef13215353d287f2..cb297e991b68cbe93062bdec95b6066e89ad3839 100644 (file)
@@ -89,6 +89,7 @@ namespace litehtml
                bool                                                    on_mouse_leave(position::vector& redraw_boxes);
                litehtml::element::ptr                  create_element(const tchar_t* tag_name, const string_map& attributes);
                element::ptr                                    root();
+               const element::ptr                                      over_element() const;
                void                                                    get_fixed_boxes(position::vector& fixed_boxes);
                void                                                    add_fixed_box(const position& pos);
                void                                                    add_media_list(media_query_list::ptr list);
@@ -118,6 +119,10 @@ namespace litehtml
        {
                return m_root;
        }
+       inline const element::ptr document::over_element() const
+       {
+               return m_over_element;
+       }
        inline void document::add_tabular(const element::ptr& el)
        {
                m_tabular_elements.push_back(el);