Close layer surfaces on output removal

Fixes mako not making new notifications if one is sent during sleep
This commit is contained in:
Ottatop 2024-04-27 12:51:03 -05:00
parent b8098f4d45
commit 4eb29c49dc

View file

@ -51,7 +51,10 @@ use smithay::{
vulkan::{self, version::Version, PhysicalDevice}, vulkan::{self, version::Version, PhysicalDevice},
SwapBuffersError, SwapBuffersError,
}, },
desktop::utils::{send_frames_surface_tree, OutputPresentationFeedback}, desktop::{
layer_map_for_output,
utils::{send_frames_surface_tree, OutputPresentationFeedback},
},
input::pointer::CursorImageStatus, input::pointer::CursorImageStatus,
output::{Output, PhysicalProperties, Subpixel}, output::{Output, PhysicalProperties, Subpixel},
reexports::{ reexports::{
@ -1181,6 +1184,12 @@ impl Udev {
scale: Some(output.current_scale()), scale: Some(output.current_scale()),
}, },
); );
// TODO: extract into a `remove_output` function and unify with dummy backend
for layer in layer_map_for_output(&output).layers() {
layer.layer_surface().send_close();
}
pinnacle.space.unmap_output(&output); pinnacle.space.unmap_output(&output);
pinnacle.gamma_control_manager_state.output_removed(&output); pinnacle.gamma_control_manager_state.output_removed(&output);