mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 04:35:07 +00:00
WebContent: Pass mouse events through to the WebContent process
Just send the incoming mouse events across to the other side and let LibWeb deal with them. :^)
This commit is contained in:
parent
0bac2ad3b3
commit
e58a13e3f6
2 changed files with 18 additions and 0 deletions
|
@ -63,6 +63,21 @@ void WebContentView::resize_event(GUI::ResizeEvent& event)
|
|||
client().post_message(Messages::WebContentServer::Paint(m_bitmap->rect(), m_bitmap->shbuf_id()));
|
||||
}
|
||||
|
||||
void WebContentView::mousedown_event(GUI::MouseEvent& event)
|
||||
{
|
||||
client().post_message(Messages::WebContentServer::MouseDown(event.position(), event.button(), event.buttons(), event.modifiers()));
|
||||
}
|
||||
|
||||
void WebContentView::mouseup_event(GUI::MouseEvent& event)
|
||||
{
|
||||
client().post_message(Messages::WebContentServer::MouseUp(event.position(), event.button(), event.buttons(), event.modifiers()));
|
||||
}
|
||||
|
||||
void WebContentView::mousemove_event(GUI::MouseEvent& event)
|
||||
{
|
||||
client().post_message(Messages::WebContentServer::MouseMove(event.position(), event.button(), event.buttons(), event.modifiers()));
|
||||
}
|
||||
|
||||
void WebContentView::notify_server_did_paint(Badge<WebContentClient>, i32 shbuf_id)
|
||||
{
|
||||
if (m_bitmap->shbuf_id() == shbuf_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue