Remove entry from device.surfaces on disconnect
This commit is contained in:
parent
38ec635750
commit
5f8a206036
1 changed files with 2 additions and 2 deletions
|
|
@ -478,8 +478,8 @@ impl State {
|
|||
let changes = device.enumerate_surfaces()?;
|
||||
let mut w = self.common.shell.global_space().size.w;
|
||||
for crtc in changes.removed {
|
||||
if let Some(surface) = device.surfaces.get_mut(&crtc) {
|
||||
if let Some(token) = surface.render_timer_token.take() {
|
||||
if let Some(surface) = device.surfaces.remove(&crtc) {
|
||||
if let Some(token) = surface.render_timer_token {
|
||||
self.common.event_loop_handle.remove(token);
|
||||
}
|
||||
w -= surface.output.current_mode().map(|m| m.size.w).unwrap_or(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue