mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibGUI: Implement enter/leave events (with WindowServer support.)
Windows now learn when the mouse cursor leaves or enters them. Use this to implement GWidget::{enter,leave}_event() and use that to implement the CoolBar button effect. :^)
This commit is contained in:
parent
af7eb5c89c
commit
bf30502560
Notes:
sideshowbarker
2024-07-19 15:39:57 +09:00
Author: https://github.com/awesomekling
Commit: bf30502560
14 changed files with 103 additions and 5 deletions
|
@ -63,6 +63,10 @@ void GWidget::event(GEvent& event)
|
|||
return mousedown_event(static_cast<GMouseEvent&>(event));
|
||||
case GEvent::MouseUp:
|
||||
return mouseup_event(static_cast<GMouseEvent&>(event));
|
||||
case GEvent::Enter:
|
||||
return enter_event(event);
|
||||
case GEvent::Leave:
|
||||
return leave_event(event);
|
||||
default:
|
||||
return GObject::event(event);
|
||||
}
|
||||
|
@ -173,6 +177,14 @@ void GWidget::focusout_event(GEvent&)
|
|||
{
|
||||
}
|
||||
|
||||
void GWidget::enter_event(GEvent&)
|
||||
{
|
||||
}
|
||||
|
||||
void GWidget::leave_event(GEvent&)
|
||||
{
|
||||
}
|
||||
|
||||
void GWidget::update()
|
||||
{
|
||||
update(rect());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue