layer-shell: properly handle re-map
Browse files at this commit2415346caaa4121ed202b8e376fb40b2a44eb61fParent: 3f2b7e61 changed file +14 -0
- src/handlers/layer_shell.rs +14 -0
src/handlers/layer_shell.rsmodified+14 -0
| @@ -176,6 +176,20 @@ impl State { | |||
| 176 | } else { | 176 | } else { |
| 177 | self.niri.mapped_layer_surfaces.remove(layer); | 177 | self.niri.mapped_layer_surfaces.remove(layer); |
| 178 | self.niri.unmapped_layer_surfaces.insert(surface.clone()); | 178 | self.niri.unmapped_layer_surfaces.insert(surface.clone()); |
| 179 | + | ||
| 180 | + // After layer surface unmaps it has to perform the initial commit-configure | ||
| 181 | + // sequence again. This is a workaround until Smithay properly resets | ||
| 182 | + // initial_configure_sent upon the surface unmapping itself as it does for | ||
| 183 | + // toplevels. | ||
| 184 | + with_states(surface, |states| { | ||
| 185 | + let mut data = states | ||
| 186 | + .data_map | ||
| 187 | + .get::<LayerSurfaceData>() | ||
| 188 | + .unwrap() | ||
| 189 | + .lock() | ||
| 190 | + .unwrap(); | ||
| 191 | + data.initial_configure_sent = false; | ||
| 192 | + }); | ||
| 179 | } | 193 | } |
| 180 | } else { | 194 | } else { |
| 181 | let scale = output.current_scale(); | 195 | let scale = output.current_scale(); |