1
0
Fork 0
forked from wry/wry

wayland: don't store direct output references

This commit is contained in:
Julian Orth 2024-04-25 19:38:19 +02:00
parent 0605438d56
commit 4651f760f0
13 changed files with 123 additions and 65 deletions

View file

@ -158,7 +158,8 @@ impl ConnectorHandler {
node: on.clone(),
});
self.state.outputs.set(self.id, output_data);
global.node.set(Some(on.clone()));
global.opt.node.set(Some(on.clone()));
global.opt.global.set(Some(global.clone()));
let mut ws_to_move = VecDeque::new();
if self.state.outputs.len() == 1 {
let seats = self.state.globals.seats.lock();
@ -227,10 +228,9 @@ impl ConnectorHandler {
if let Some(config) = self.state.config.get() {
config.connector_disconnected(self.id);
}
global.node.set(None);
global.clear();
for (_, jo) in on.jay_outputs.lock().drain() {
jo.send_destroyed();
jo.output.take();
}
let screencasts: Vec<_> = on.screencasts.lock().values().cloned().collect();
for sc in screencasts {