feat: add focus api

This commit is contained in:
mrxiaozhuox committed 2022-01-31 19:44:40 +08:00
1 parent 366cf75887
commit 7ca92be015
2 files changed
+12

No files matched your search

+5
View File
@@ -52,6 +52,11 @@ impl DesktopContext {
pub fn close(&self) {
let _ = self.proxy.send_event(UserWindowEvent::CloseWindow);
}
/// set window to focus
pub fn focus(&self) {
let _ = self.proxy.send_event(UserWindowEvent::FocusWindow);
}
}
/// use this function can get the `DesktopContext` context.