Improvements for Hyprland workspace

1. Utilize `m_mutex` to safeguard member fields of `hyprland::Workspaces` as they are modified by multiple threads, including the event listener thread and UI thread. This applies to all member fields, not just `m_workspacesToCreate`.

2. Tidy up the create/remove workspace code.
This commit is contained in:
yangyingchao
2024-01-05 13:49:11 +08:00
parent 4b20f522f0
commit a34e3ccc86
2 changed files with 20 additions and 22 deletions

View File

@ -161,6 +161,8 @@ class Workspaces : public AModule, public EventHandler {
int windowRewritePriorityFunction(std::string const& window_rule);
void doUpdate();
bool m_allOutputs = false;
bool m_showSpecial = false;
bool m_activeOnly = false;