mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user