mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWebView: Add common source loop source for deferred_invoke() on macOS
Previously, `EventLoopImplementationMacOS` didn't process
`deferred_invoke()` callbacks during window resizing because they were
scheduled in the "default" run-loop mode, which isn't serviced while the
run loop is in "Event Tracking" mode.
Commit 3bbe1b0c changed socket notifiers to schedule in
`kCFRunLoopCommonModes`, which kept IPC reads responsive during resizing
(we process IPC messages in the notifier's read hook). This change does
the same for `deferred_invoke()`: it installs a `CFRunLoopSource` in
`kCFRunLoopCommonModes` and signals it whenever a deferred callback is
enqueued.
This commit is contained in:
parent
d4deafe5fe
commit
6c71960425
Notes:
github-actions[bot]
2025-10-24 14:06:06 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 6c71960425
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6535
Reviewed-by: https://github.com/trflynn89
2 changed files with 45 additions and 4 deletions
|
|
@ -43,8 +43,13 @@ public:
|
|||
virtual bool was_exit_requested() const override;
|
||||
virtual void post_event(Core::EventReceiver& receiver, NonnullOwnPtr<Core::Event>&&) override;
|
||||
|
||||
virtual ~EventLoopImplementationMacOS() override;
|
||||
|
||||
private:
|
||||
EventLoopImplementationMacOS() = default;
|
||||
EventLoopImplementationMacOS();
|
||||
|
||||
struct Impl;
|
||||
NonnullOwnPtr<Impl> m_impl;
|
||||
|
||||
int m_exit_code { 0 };
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue