Fix thread safety in Hyprland modules to prevent corrupted double-linked list crash
- Move GTK operations from IPC thread to GTK main thread in Window module - Move GTK operations from IPC thread to GTK main thread in WindowCount module - Move GTK style class operations from IPC thread to GTK main thread in Submap module - Language and Workspaces modules already safe (only update internal state) Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
This commit is contained in:
@ -45,6 +45,8 @@ Window::~Window() {
|
||||
auto Window::update() -> void {
|
||||
std::shared_lock<std::shared_mutex> windowIpcShareLock(windowIpcSmtx);
|
||||
|
||||
queryActiveWorkspace();
|
||||
|
||||
std::string windowName = waybar::util::sanitize_string(workspace_.last_window_title);
|
||||
std::string windowAddress = workspace_.last_window;
|
||||
|
||||
@ -236,8 +238,6 @@ void Window::queryActiveWorkspace() {
|
||||
}
|
||||
|
||||
void Window::onEvent(const std::string& ev) {
|
||||
queryActiveWorkspace();
|
||||
|
||||
dp.emit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user