From c1240a98aad66672f39ac3d545ee38413d3f5ff3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 08:56:17 +0000 Subject: [PATCH] Fix mutex locking in WindowCount module Ensure workspace_ accesses are properly protected by mutex after queryActiveWorkspace call Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com> --- src/modules/hyprland/windowcount.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/hyprland/windowcount.cpp b/src/modules/hyprland/windowcount.cpp index 91589189..5d9ee1c3 100644 --- a/src/modules/hyprland/windowcount.cpp +++ b/src/modules/hyprland/windowcount.cpp @@ -44,6 +44,8 @@ auto WindowCount::update() -> void { std::string formatWindowed = config_["format-windowed"].asString(); std::string formatFullscreen = config_["format-fullscreen"].asString(); + std::lock_guard lg(mutex_); + setClass("empty", workspace_.windows == 0); setClass("fullscreen", workspace_.hasfullscreen);