mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibCore: Remove unused NotifierActivationEvent fd() and type() methods
In 11b8bbe one thing that was claimed was that we now properly set the
Notifier's actual fd on the NotifierActivationEvent. It turns out that
claim was false because a crucial step was forgotten: actually set the
m_notifier_fd when registering. Despite that mistake, it ultimately was
irrelevant as the methods on NotifierActivationEvent are currently
unused code. We were posting the event to the correct Notifier receiver
so the on_activation was still getting invoked.
Given they are unused, NotifierActivationEvent can be defined the same
way as TimerEvent is, where we just pass the event type enum to the
Event base class. Additionally, NotificationType can be moved to
the Notifier header as this enum is now always used in the context of
creating or using a Notifier instance.
This commit is contained in:
parent
c34b5a544e
commit
4fb1ba0193
Notes:
github-actions[bot]
2025-11-22 08:48:51 +00:00
Author: https://github.com/ayeteadoe
Commit: 4fb1ba0193
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6903
Reviewed-by: https://github.com/gmta ✅
7 changed files with 21 additions and 34 deletions
|
|
@ -221,8 +221,10 @@ static int notifier_callback(int fd, int events, void* data)
|
|||
if (events & ALOOPER_EVENT_ERROR)
|
||||
type |= Core::NotificationType::Error;
|
||||
|
||||
Core::NotifierActivationEvent event(notifier.fd(), type);
|
||||
notifier.dispatch_event(event);
|
||||
if (type != Core::NotificationType::None) {
|
||||
Core::NotifierActivationEvent event;
|
||||
notifier.dispatch_event(event);
|
||||
}
|
||||
|
||||
// Wake up from ALooper_pollAll, and service this event on the event queue
|
||||
current_impl().wake();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue