pub fn clear_focus_on_surface_destroy(&mut self, surface: ObjectRef<Surface>) {
        if Some(surface) == self.pointer_focus {
            self.pointer_focus = None;
        }
        if Some(surface) == self.keyboard_focus {
            self.keyboard_focus = None;
        }
    }
/// Updates focus state in response to a surface being unmapped.
///
/// Since a new surface may be created with the same object id as `surface`,
/// we need to ensure our current focus is cleared so we can send new focus
/// enter events for the new surface. This does not send focus leave
/// events as these are implicit with the surface being destroyed.
///
/// This has no effect if the surface being destroyed has no focus.
Updates focus state in response to a surface being unmapped.
Since a new surface may be created with the same object id as `surface`,
we need to ensure our current focus is cleared so we can send new focus
enter events for the new surface. This does not send focus leave
events as these are implicit with the surface being destroyed.

This has no effect if the surface being destroyed has no focus.
Updates focus state in response to a surface being unmapped . Since a new surface may be created with the same object id as ` surface ` we need to ensure our current focus is cleared so we can send new focus enter events for the new surface . This does not send focus leave events as these are implicit with the surface being destroyed . This has no effect if the surface being destroyed has no focus .
pub fn clear_focus_on_surface_destroy(&mut self, surface: ObjectRef<Surface>) {
        if Some(surface) == self.pointer_focus {
            self.pointer_focus = None;
        }
        if Some(surface) == self.keyboard_focus {
            self.keyboard_focus = None;
        }
    }
pub fn clear_focus_on_surface_destroy ( & mut self , surface : ObjectRef < Surface > ) { if Some ( surface ) == self . pointer_focus { self . pointer_focus = None ; } if Some ( surface ) == self . keyboard_focus { self . keyboard_focus = None ; } }
Updates focus state in response to a surface being unmapped.
Updates focus state in response to a surface being unmapped .
&mut self
surface
ObjectRef<Surface>
&mut self
surface
ObjectRef<Surface>