mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
Browser: Go back/forward when pressing back/forward mouse buttons
This currently doesn't work when running Serenity through QEMU, as it doesn't pass the side button events over to Serenity due to some bug or missing feature.
This commit is contained in:
parent
2f3ebce7c8
commit
af1c26f05b
3 changed files with 18 additions and 0 deletions
|
@ -174,6 +174,12 @@ void OutOfProcessWebView::mousedown_event(GUI::MouseEvent& event)
|
|||
void OutOfProcessWebView::mouseup_event(GUI::MouseEvent& event)
|
||||
{
|
||||
enqueue_input_event(event);
|
||||
|
||||
if (event.button() == GUI::MouseButton::Backward && on_back_button) {
|
||||
on_back_button();
|
||||
} else if (event.button() == GUI::MouseButton::Forward && on_forward_button) {
|
||||
on_forward_button();
|
||||
}
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::mousemove_event(GUI::MouseEvent& event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue