diff options
| author | ImperishableSecret <57067794+imperishableSecret@users.noreply.github.com> | 2026-04-30 02:43:15 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-29 22:13:15 +0100 |
| commit | 56d7a43102b53f79a2311662783d5dd94cb2f1a5 (patch) | |
| tree | 1c1c0427245abdca295801803329fa716952ca37 /src/config/lua/objects/LuaWindow.cpp | |
| parent | 31e025dbe04dbe1836ea759f6b6e2ea09591fb23 (diff) | |
config/lua: expand properties in the workspace object (#14194)
Diffstat (limited to 'src/config/lua/objects/LuaWindow.cpp')
| -rw-r--r-- | src/config/lua/objects/LuaWindow.cpp | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/src/config/lua/objects/LuaWindow.cpp b/src/config/lua/objects/LuaWindow.cpp index 1d933462..7fe87334 100644 --- a/src/config/lua/objects/LuaWindow.cpp +++ b/src/config/lua/objects/LuaWindow.cpp @@ -1,6 +1,7 @@ #include "LuaWindow.hpp" #include "LuaWorkspace.hpp" #include "LuaMonitor.hpp" +#include "LuaGroup.hpp" #include "LuaObjectHelpers.hpp" #include "../../../desktop/view/Window.hpp" @@ -126,38 +127,7 @@ static int windowIndex(lua_State* L) { return 1; } - lua_newtable(L); - - lua_pushboolean(L, w->m_group->locked()); - lua_setfield(L, -2, "locked"); - - lua_pushboolean(L, w->m_group->denied()); - lua_setfield(L, -2, "denied"); - - lua_pushinteger(L, sc<lua_Integer>(w->m_group->size())); - lua_setfield(L, -2, "size"); - - lua_pushinteger(L, sc<lua_Integer>(w->m_group->getCurrentIdx()) + 1); - lua_setfield(L, -2, "current_index"); - - const auto current = w->m_group->current(); - if (current) - Objects::CLuaWindow::push(L, current); - else - lua_pushnil(L); - lua_setfield(L, -2, "current"); - - lua_newtable(L); - int i = 1; - for (const auto& grouped : w->m_group->windows()) { - const auto groupedWindow = grouped.lock(); - if (!groupedWindow) - continue; - - Objects::CLuaWindow::push(L, groupedWindow); - lua_rawseti(L, -2, i++); - } - lua_setfield(L, -2, "members"); + Objects::CLuaGroup::push(L, w->m_group); } else if (key == "tags") { lua_newtable(L); |
