You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: compositor.rs
    path of file: ./repos/strata/src/handlers
    
    the code of the file until where you have to start completion: // Copyright 2023 the Strata authors
// SPDX-License-Identifier: GPL-3.0-or-later

use smithay::{
	backend::renderer::utils::on_commit_buffer_handler,
	delegate_compositor,
	delegate_data_device,
	delegate_layer_shell,
	delegate_output,
	delegate_primary_selection,
	delegate_seat,
	delegate_shm,
	des
    
	fn layer_destroyed(&mut self, surface: WlrLayerSurface) {
		if let Some((mut map, layer)) = self.workspaces.outputs().find_map(|o| {
			let map = layer_map_for_output(o);
			let layer = map.layers().find(|&layer| layer.layer_surface() == &surface).cloned();
			layer.map(|layer| (map, layer))
		}) {
			map.unmap_layer(&layer);
		}
		self.set_input_focus_auto();
		for workspace in self.workspaces.iter() {
			refresh_geometry(workspace);
		}
	}