mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:58:12 +00:00
LibCore: Allow listening for multiple conditions using a single Notifier
While on it, implement currently unused Notifier::set_type correctly (but not efficiently) by re-registering Notifier in the EventLoop.
This commit is contained in:
parent
5d1657f57f
commit
77e4f0d7d8
6 changed files with 44 additions and 20 deletions
|
@ -106,7 +106,7 @@ static void socket_notifier(CFSocketRef socket, CFSocketCallBackType notificatio
|
|||
// before dispatching the event, which allows it to be triggered again.
|
||||
CFSocketEnableCallBacks(socket, notification_type);
|
||||
|
||||
Core::NotifierActivationEvent event(notifier.fd());
|
||||
Core::NotifierActivationEvent event(notifier.fd(), notifier.type());
|
||||
notifier.dispatch_event(event);
|
||||
|
||||
// This manual process of enabling the callbacks also seems to require waking the event loop,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue