summaryrefslogtreecommitdiff
path: root/Ladybird/Tab.cpp
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-11-08 02:00:24 +0100
committerAndrew Kaster <andrewdkaster@gmail.com>2022-12-25 07:58:58 -0700
commit982174706b754e7cd26625beeb0242da85066cd3 (patch)
tree9abc83e6a8c35f19a22b680e5a1793f8b0ff0595 /Ladybird/Tab.cpp
parentef553a4b768cb6b5a5acd0305098a2111febede6 (diff)
downloadserenity-982174706b754e7cd26625beeb0242da85066cd3.zip
Ladybird: Handle forward and backward mouse buttons
We now emit a new signal for backward mouse button's mouseup and forward mouse button's mouseup which is handled by going back and forward in the history respectively:))
Diffstat (limited to 'Ladybird/Tab.cpp')
-rw-r--r--Ladybird/Tab.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Ladybird/Tab.cpp b/Ladybird/Tab.cpp
index b68c166bc9..d1430c0bbd 100644
--- a/Ladybird/Tab.cpp
+++ b/Ladybird/Tab.cpp
@@ -73,6 +73,14 @@ Tab::Tab(BrowserWindow* window)
m_hover_label->hide();
});
+ QObject::connect(m_view, &WebContentView::back_mouse_button, [this] {
+ back();
+ });
+
+ QObject::connect(m_view, &WebContentView::forward_mouse_button, [this] {
+ forward();
+ });
+
QObject::connect(m_view, &WebContentView::load_started, [this](const URL& url) {
m_location_edit->setText(url.to_string().characters());
m_history.push(url, m_title.toUtf8().data());