diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-29 21:31:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-29 21:31:06 +0100 |
| commit | 9ee5ff1f7181cc5fa575f1702802ccb78c21ba12 (patch) | |
| tree | aab51303b4d045d0633cfe122069456694fdf2e0 /src/config/lua/bindings/LuaBindingsInternal.cpp | |
| parent | 45ffaee09361110c018e962dbb3d93f7f1ee8e09 (diff) | |
animations: add springs (#14171)
Diffstat (limited to 'src/config/lua/bindings/LuaBindingsInternal.cpp')
| -rw-r--r-- | src/config/lua/bindings/LuaBindingsInternal.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config/lua/bindings/LuaBindingsInternal.cpp b/src/config/lua/bindings/LuaBindingsInternal.cpp index a6af42f8..e0cef146 100644 --- a/src/config/lua/bindings/LuaBindingsInternal.cpp +++ b/src/config/lua/bindings/LuaBindingsInternal.cpp @@ -574,3 +574,14 @@ std::expected<SP<Desktop::Rule::CWindowRule>, int> Internal::buildRuleFromTable( return rule; } + +bool Internal::hasTableField(lua_State* L, int tableIdx, const char* field) { + lua_getfield(L, tableIdx, field); + if (lua_isnoneornil(L, -1)) { + lua_pop(L, 1); + return false; + } + + lua_pop(L, 1); + return true; +} |
