Implement missing SetForeground api function. Fixes #2

This commit is contained in:
meehl committed 2025-10-28 23:12:09 +01:00
1 parent f2387804c1
commit 38e3a39782
4 files changed
+19 -2

No files matched your search

+6
View File
@@ -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(())
}