forked from InfoshockTech/xcrab
remove_focused_client
This commit is contained in:
parent
947a051b48
commit
cc87ae4a32
|
@ -534,6 +534,17 @@ impl XcrabWindowManager {
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn remove_focused_client<Dpy: AsyncDisplay + ?Sized>(
|
||||||
|
&mut self,
|
||||||
|
conn: &mut Dpy,
|
||||||
|
) -> Result<()> {
|
||||||
|
if let Some(focused) = self.focused {
|
||||||
|
self.remove_client(conn, focused).await
|
||||||
|
} else {
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn may_not_exist(res: breadx::Result) -> breadx::Result {
|
pub fn may_not_exist(res: breadx::Result) -> breadx::Result {
|
||||||
|
|
Loading…
Reference in a new issue