cosmic-screencopy-v2

This commit is contained in:
Victoria Brekenfeld 2024-03-12 19:42:48 +01:00 committed by Victoria Brekenfeld
parent 973cfed87b
commit b40d153809
27 changed files with 3647 additions and 2743 deletions

View file

@ -14,8 +14,6 @@ use smithay::{
},
};
use super::screencopy::PendingScreencopyBuffers;
impl WlrLayerShellHandler for State {
fn shell_state(&mut self) -> &mut WlrLayerShellState {
&mut self.common.shell.layer_shell_state
@ -76,19 +74,8 @@ impl WlrLayerShellHandler for State {
self.common.shell.workspaces.recalculate();
// collect screencopy sessions needing an update
let mut scheduled_sessions = self.schedule_workspace_sessions(surface.wl_surface());
if let Some(sessions) = output.user_data().get::<PendingScreencopyBuffers>() {
scheduled_sessions
.get_or_insert_with(Vec::new)
.extend(sessions.borrow_mut().drain(..));
}
self.backend.schedule_render(
&self.common.event_loop_handle,
&output,
scheduled_sessions,
);
self.backend
.schedule_render(&self.common.event_loop_handle, &output);
}
}
}