mirror of
https://github.com/Alexays/Waybar.git
synced 2026-08-18 11:07:06 +00:00
set_current_layout() mutated label_'s GTK style context (remove_class/ add_class) while being called from the sway IPC worker thread via onEvent(). Off-main-thread GTK widget mutation caused a SIGSEGV. Record only the target layout in set_current_layout() and apply the matching CSS class in update(), which the dispatcher runs on the GTK main thread. A new applied_class_ member tracks the currently applied class so update() can swap it. The shared layout_/applied_class_ state is guarded by the existing mutex_. Fixes #3702.