Commit graph

12 commits

Author SHA1 Message Date
ayeteadoe
01ad180182 UI/Qt: Implement hash/equals Traits for pthread_t to support Windows
This cleans up the initial hack that got Windows building again by
moving the ifdef soup into a Windows only Traits<pthread_t>
implementation. We also avoid the integer comparison problem by using
Optional<pthread_t>.
2025-11-03 01:45:42 -06:00
ayeteadoe
6e79c14ed0 UI/Qt: Support usage of pthread_t as a hash map key on Windows
https://programmerall.com/article/10061564414/ describes the slight
differences in how pthread_t is implemented on Windows. This is a hack
to get Windows building and running again, but long term it'd be ideal
to create an abstraction for any usage of pthread_t in the codebase.
2025-11-03 02:28:52 +01:00
Aliaksandr Kalenik
0b20ba1c0f LibWebView: Allow unregistering notifier on different thread in AppKit
This change updates MacOS event loop implementation to allow notifiers
to be unregistered from threads other than the one they were created on.

Upcoming IPC changes will move transport socket reading into separate
thread and depend on this behavior.
2025-11-02 22:43:10 +01:00
Aliaksandr Kalenik
2a98f0d7aa LibWebView: Allow unregistering notifier on different thread in Qt
This change updates Qt event loop implementation to allow notifiers to
be unregistered from threads other than the one they were created on.

Upcoming IPC changes will move transport socket reading into separate
thread and depend on this behavior.
2025-11-02 22:43:10 +01:00
Aliaksandr Kalenik
6c71960425 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.
2025-10-24 16:04:42 +02:00
ayeteadoe
9c67c4a270 LibWebView: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Andreas Kling
c47e253c60 LibCore: Remove unused "visible for timer purposes" concept
This was a long-unused leftover from SerenityOS.
2025-08-11 16:55:25 +02:00
Andrew Kaster
b50d03f42e LibCore+LibWebView: Restore was_exit_requested to EventLoop
This method was removed in e015a43b51

However, it was not exactly *unused* as the commit message would say.
This method was the only thing that allowed spin_until to exit when
the event loop was cancelled. This happens normally when IPC connections
are closed, but also when the process is killed.

The logic to properly handle process exit from event loop spins needs to
actually notify the caller that their goal condition was not met though.
That will be handled in a later commit.
2025-04-30 11:12:23 -04:00
Lucas CHOLLET
e015a43b51 LibCore: Remove unused methods from EventLoop 2025-01-30 15:34:02 -07:00
Timothy Flynn
27478ec7d4 Everywhere: Run clang-format
The following command was used to clang-format these files:

    clang-format-19 -i $(find . \
        -not \( -path "./\.*" -prune \) \
        -not \( -path "./Build/*" -prune \) \
        -not \( -path "./Toolchain/*" -prune \) \
        -type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
2024-12-28 05:39:32 -08:00
Pavel Shliak
6f81b80114 Everywhere: Include HashMap only where it's actually used 2024-12-09 12:31:16 +01: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