1
0
Fork 0
forked from wry/wry

wayland: add jay_workspace_watcher

This commit is contained in:
Julian Orth 2022-07-30 11:28:46 +02:00
parent 83baa6aadb
commit 022d8d1db0
9 changed files with 145 additions and 4 deletions

View file

@ -30,6 +30,7 @@ use {
},
wire::JayOutputId,
},
ahash::AHashMap,
smallvec::SmallVec,
std::{
cell::{Cell, RefCell},
@ -301,6 +302,15 @@ impl OutputNode {
if self.workspace.get().is_none() {
self.show_workspace(&ws);
}
let mut clients_to_kill = AHashMap::new();
for watcher in self.state.workspace_watchers.lock().values() {
if let Err(e) = watcher.send_workspace(&ws) {
clients_to_kill.insert(watcher.client.id, (watcher.client.clone(), e));
}
}
for (client, e) in clients_to_kill.values() {
client.error(e);
}
self.update_render_data();
ws
}