fix(wayland): constant-initialised statics in Device, for clang 23.1 on aarch64-musl

With the touch positions in an inline static std::unordered_map and the
text input's strings in inline static std::strings, clang 23.1 crashed
compiling Device.cpp for aarch64-alpine-linux-musl against that sysroot's
libc++ 22 — in LazyCallGraph at -O3, in the ThinLTO bitcode writer at -O0
(a dangling global); the native build was fine. The fingers now live in a
constant-initialised array of slots and the strings in function-local
statics of the implementation unit; nothing else changes.
This commit is contained in:
Jorijn van der Graaf 2026-10-18 02:06:03 +02:00
commit cc04d4e121
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
3 changed files with 80 additions and 23 deletions

View file

@ -560,7 +560,7 @@ Window::~Window() {
if (Device::keyboardWindow == this) Device::keyboardWindow = nullptr;
if (Device::touchWindow == this) {
Device::touchWindow = nullptr;
Device::touchPositions.clear();
Device::ForgetTouches();
}
if (Device::textInputWindow == this) Device::textInputWindow = nullptr;
#endif