ladybird/Libraries/LibCore
ayeteadoe f4c8fd4bef LibCore+LibWebView+UI/Qt: Support TimeZoneWatcher on Windows
To detect system time zone changes on Windows, the event we need to look
for is WM_TIMECHANGE. The problem is how the callback with said message
actually gets invoked is very particular. (1) We must have an active
message pump (event loop) for the message to ever be processed. (2) We
must be a GUI application as WM_TIMECHANGE messages are seemingly sent
to top level windows only. It doesn't say that in the docs for the
event, but attempts of creating a LibTest-based application with a
message pump and a message only window and never receiving the event
point to that probably being true.

This workaround is built off the fact that Qt's message pump defined
internally in QEventDispatcherWin32::processEvents does in fact receive
WM_TIMECHANGE events, even though it is not exposed as a QEvent::Type.
Given the requirements stated above it makes sense that it works here as
the message pump is executing in a QGuiApplication context. So we use a
native event filter to hook into the unexposed WM_TIMECHANGE event and
forward it along to the on_time_zone_changed() callback.

Note that if a Windows GUI framework is done in the future, we'll have
to re-add support to ensure the TimeZoneWatcher still gets invoked.
2025-10-05 15:46:15 +02:00
..
Platform
AnonymousBuffer.cpp LibCore+LibIPC: Move various encode/decode specializations to LibIPC 2025-06-14 16:03:26 -04:00
AnonymousBuffer.h LibCore+LibIPC: Move various encode/decode specializations to LibIPC 2025-06-14 16:03:26 -04:00
AnonymousBufferWindows.cpp LibCore: Consistently treat file descriptors as handles on Windows 2025-02-05 19:27:47 -07:00
ArgsParser.cpp LibCore+LibJS+LibWasm: Always use a real format string 2025-04-08 20:00:18 -04:00
ArgsParser.h
CMakeLists.txt LibCore+LibWebView+UI/Qt: Support TimeZoneWatcher on Windows 2025-10-05 15:46:15 +02:00
ConfigFile.cpp Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00
ConfigFile.h
DeferredInvocationContext.h
Directory.cpp AK+LibCore: Avoid double-negation of syscall error values 2025-05-10 21:19:46 -04:00
Directory.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
DirectoryEntry.cpp
DirectoryEntry.h
DirIterator.cpp
DirIterator.h
ElapsedTimer.cpp
ElapsedTimer.h LibCore: Remove deprecated ElapsedTimer::elapsed() 2024-11-23 19:20:03 +01:00
Environment.cpp AK: Remove unnecessary StringBuilder::create() factory 2025-10-05 11:24:46 +02:00
Environment.h
Event.h LibCore: Remove unused CustomEvent 2025-08-11 16:55:25 +02:00
EventLoop.cpp LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoop.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoopExecutor.swift LibCore: Add swift bindings for EventLoop as an Executor and Actor 2025-03-15 21:51:22 -06:00
EventLoopImplementation.cpp LibCore: Ensure we don't replace an already-installed event loop manager 2025-06-13 17:06:16 +02:00
EventLoopImplementation.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoopImplementationUnix.cpp LibCore: Make timer firing order stable for equal deadlines 2025-09-22 12:34:32 +01:00
EventLoopImplementationUnix.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoopImplementationWindows.cpp LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoopImplementationWindows.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventReceiver.cpp LibCore: Remove unused CustomEvent 2025-08-11 16:55:25 +02:00
EventReceiver.h LibCore: Remove macro-generated EventReceiver::try_create(...) factories 2025-08-11 16:55:25 +02:00
EventSwift.h LibCore: Add swift bindings for EventLoop as an Executor and Actor 2025-03-15 21:51:22 -06:00
EventSwift.mm Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
File.cpp Everywhere: Fix typos - act III 2025-06-16 14:20:48 +01:00
File.h LibCore+LibIPC: Remove badge on File::leak_fd 2025-06-14 16:03:26 -04:00
FileWatcher.h Everywhere: Include HashMap only where it's actually used 2024-12-09 12:31:16 +01:00
FileWatcherLinux.cpp LibCore: Remove macro-generated EventReceiver::try_create(...) factories 2025-08-11 16:55:25 +02:00
FileWatcherUnimplemented.cpp
Forward.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
IOSurface.cpp
IOSurface.h
LocalServer.cpp LibCore: Remove unused LocalServer constructor parameter 2025-08-11 16:55:25 +02:00
LocalServer.h LibCore: Remove unused LocalServer constructor parameter 2025-08-11 16:55:25 +02:00
LocalServerWindows.cpp LibCore: Remove unused LocalServer constructor parameter 2025-08-11 16:55:25 +02:00
MachPort.cpp
MachPort.h
MappedFile.cpp LibCore+LibIPC: Remove badge on File::leak_fd 2025-06-14 16:03:26 -04:00
MappedFile.h Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
MimeData.cpp LibCore: Add AVIF to registered types in MimeData 2025-08-22 08:03:28 -04:00
MimeData.h
NetworkResponse.h
Notifier.cpp LibCore: Stop parenting notifiers 2025-08-11 16:55:25 +02:00
Notifier.h LibCore: Stop parenting notifiers 2025-08-11 16:55:25 +02:00
Process.cpp Everywhere: Fix a few unreachable-return / unreachable-break warnings 2025-09-12 14:33:14 +01:00
Process.h LibCore: Implement System::current_executable_path on Windows 2025-03-19 20:25:24 -06:00
ProcessWindows.cpp AK+LibJS+LibWeb+LibRegex: Replace AK::Utf16Data with AK::Utf16String 2025-07-18 12:45:38 -04:00
Promise.h LibCore: Allow Promise to be resolved if it has a non-Error error type 2025-10-02 14:50:04 +02:00
Proxy.h LibCore+LibIPC: Move various encode/decode specializations to LibIPC 2025-06-14 16:03:26 -04:00
Resource.cpp
Resource.h
ResourceImplementation.cpp LibCore: Add S_ISDIR, S_ISREG to System.h on Windows 2025-02-12 18:42:05 -07:00
ResourceImplementation.h
ResourceImplementationFile.cpp LibCore: Add S_ISDIR, S_ISREG to System.h on Windows 2025-02-12 18:42:05 -07:00
ResourceImplementationFile.h
SharedCircularQueue.h LibCore: Atomically ref-count SharedSingleProducerCircularQueue guts 2025-05-24 06:52:25 -06:00
Socket.cpp Tests/LibCore: Enable TestLibCoreStream in Windows CI 2025-08-06 20:24:38 -06:00
Socket.h Tests/LibCore: Enable TestLibCoreStream in Windows CI 2025-08-06 20:24:38 -06:00
SocketAddress.h AK+Meta+LibCore+Tests: Remove unused SipHash implementation 2025-04-06 01:47:50 +02:00
SocketAddressWindows.h LibCore: Add Windows implementation of TCPSocket::connect 2025-06-23 18:58:01 -06:00
SocketpairWindows.cpp LibCore: Implement System::socketpair on Windows 2025-02-14 09:38:59 -07:00
SocketWindows.cpp LibCore: Fix WSAEMSGSIZE error in pending_bytes with proper zero-init 2025-08-23 18:35:45 -06:00
StandardPaths.cpp test-web: Allow help command to succeed 2025-08-23 16:04:36 -06:00
StandardPaths.h LibCore+LibGfx: Move font_directories from LibCore to LibGfx 2025-05-26 12:14:29 -06:00
System.cpp AK: Remove unnecessary StringBuilder::create() factory 2025-10-05 11:24:46 +02:00
System.h LibCore: Implement SIGTERM-based kill() on Windows 2025-09-15 09:19:52 +02:00
SystemServerTakeover.cpp LibCore: Port SystemServerTakeover.cpp to Windows 2025-02-06 15:25:14 -07:00
SystemServerTakeover.h
SystemWindows.cpp LibCore: Implement SIGTERM-based kill() on Windows 2025-09-15 09:19:52 +02:00
TCPServer.cpp LibCore: Remove unused TCPServer constructor parameter 2025-08-11 16:55:25 +02:00
TCPServer.h LibCore: Remove unused TCPServer constructor parameter 2025-08-11 16:55:25 +02:00
TCPServerWindows.cpp LibCore: Remove unused TCPServer constructor parameter 2025-08-11 16:55:25 +02:00
ThreadedPromise.h LibCore: Fix ThreadedPromise issues found with ThreadSanitizer 2025-09-24 21:05:54 -05:00
ThreadEventQueue.cpp LibCore: Don't reserve 2 KiB of stack memory when processing event queue 2024-11-10 19:12:59 +01:00
ThreadEventQueue.h
Timer.cpp LibCore: Remove unused Timer APIs for constructing with a parent 2025-08-11 16:55:25 +02:00
Timer.h LibCore: Remove unused Timer APIs for constructing with a parent 2025-08-11 16:55:25 +02:00
TimeZoneWatcher.h
TimeZoneWatcherLinux.cpp
TimeZoneWatcherMacOS.mm
TimeZoneWatcherUnimplemented.cpp
TimeZoneWatcherWindows.cpp LibCore+LibWebView+UI/Qt: Support TimeZoneWatcher on Windows 2025-10-05 15:46:15 +02:00
UDPServer.cpp LibCore: Remove unused UDPServer constructor parameter 2025-08-11 16:55:25 +02:00
UDPServer.h LibCore: Remove unused UDPServer constructor parameter 2025-08-11 16:55:25 +02:00
UDPServerWindows.cpp LibCore: Remove unused UDPServer constructor parameter 2025-08-11 16:55:25 +02:00
Version.cpp LibCore: Remove LADYBIRD_GIT_VERSION environment variable usage 2025-05-15 14:02:48 +02:00
Version.h LibCore: Remove ErrorOr return type from read_long_version_string 2025-02-13 08:27:02 -05:00