Commit Graph

6 Commits

Author SHA1 Message Date
ayeteadoe
e3c2393d96 UI/Qt: Implement register_process for Qt Windows event loop
Qt does not use IOCP's in their underlying Windows event loop
implementation; however, QWinEventNotifier allows us to register a wait
on a process handle that has SYNCHRONIZE access rights. This means an
event will be signalled when that process terminates which emits the
QWinEventNotifier::activated signal.

Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2026-04-12 16:08:07 +02:00
Andreas Kling
9ad9c65368 Revert "LibCore: Add thread-safe weak deferred_invoke()"
This reverts commit 96ce468b60.

Appears to have regressed WPT.
2026-01-25 12:20:39 +01:00
Andreas Kling
96ce468b60 LibCore: Add thread-safe weak deferred_invoke()
Add a thread-safe deferred_invoke() API on WeakEventLoopReference that
queues work onto the owning thread's event queue and wakes that thread
via EventLoopManager hooks. This avoids calling wake() from foreign
threads during teardown.

Implement current_thread_handle()/wake_thread() in each backend and
track per-thread data so handles are validated before waking:

- Unix: wake via per-thread wake pipe
- Windows: wake via thread wake event
- macOS: wake via stored CFRunLoopRef
- Qt: wake via event target or QEventLoop::wakeUp()
- Android: wake via stored ALooper
2026-01-25 09:32:51 +01:00
Timothy Flynn
7d6616669c LibWebView+UI: Move the UI event loops to the UI folder
Once upon a time, we needed the UI-specific event loops outside of the
UI process. This is no longer the case. Let's move the event loops back
to the UI folder to remove the awkward interface library we were left
with.
2025-12-05 14:24:05 -05:00
Timothy Flynn
9e1f001ffe LibWebView+Services+UI: Move the EventLoop implementations to LibWebView
We currently compile the Qt event loop files multiple times, for every
target which wants to use them. This patch moves these to LibWebView as
a central location to avoid this.
2024-11-11 07:35:43 -05:00
Timothy Flynn
db47cc41f8 Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00