mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-08 04:57:32 -04:00
setting the focused view shouldn't crash the compositor
This commit is contained in:
parent
98dbdc1570
commit
63109e07da
1 changed files with 5 additions and 0 deletions
|
|
@ -111,6 +111,11 @@ pub fn set_focused(L: *zlua.Lua) i32 {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (view_id == null) {
|
||||||
|
L.pushNil();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if(server.root.viewById(@intCast(view_id.?))) |view| {
|
if(server.root.viewById(@intCast(view_id.?))) |view| {
|
||||||
view.setFocused();
|
view.setFocused();
|
||||||
L.pushNil();
|
L.pushNil();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue