mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibGUI: Add button handler for middle mouse clicks
This commit is contained in:
parent
18c84d2e63
commit
f9212ac02e
Notes:
sideshowbarker
2024-07-17 08:57:33 +09:00
Author: https://github.com/networkException
Commit: f9212ac02e
Pull-request: https://github.com/SerenityOS/serenity/pull/14544
4 changed files with 17 additions and 0 deletions
|
@ -141,6 +141,17 @@ void Button::click(unsigned modifiers)
|
|||
m_action->activate(this);
|
||||
}
|
||||
|
||||
void Button::middle_mouse_click(unsigned int modifiers)
|
||||
{
|
||||
if (!is_enabled())
|
||||
return;
|
||||
|
||||
NonnullRefPtr protector = *this;
|
||||
|
||||
if (on_middle_mouse_click)
|
||||
on_middle_mouse_click(modifiers);
|
||||
}
|
||||
|
||||
void Button::context_menu_event(ContextMenuEvent& context_menu_event)
|
||||
{
|
||||
if (!is_enabled())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue