Implement missing SetForeground api function. Fixes #2
This commit is contained in:
1 parent
f2387804c1
commit
38e3a39782
4 files changed
+19
-2
No files matched your search
@@ -26,3 +26,9 @@ pub fn set_window_title(l: &Lua, title: String) -> LuaResult<()> {
|
||||
socket.window().set_window_title(&title);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_foreground(l: &Lua, _: ()) -> LuaResult<()> {
|
||||
let socket = l.app_data_ref::<&'static ContextSocket>().unwrap();
|
||||
socket.window().focus();
|
||||
Ok(())
|
||||
}
|
||||
Reference in new issue
Block a user