From 1681bea42dd2f11ba3fe6df05560d0b231de3c76 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Wed, 6 May 2026 13:56:12 +0100 Subject: config/lua: add simple layout API (#14258) Adds a simple layout lua api --- src/config/lua/objects/LuaWindow.cpp | 2 +- src/config/lua/objects/LuaWorkspace.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/config/lua/objects') diff --git a/src/config/lua/objects/LuaWindow.cpp b/src/config/lua/objects/LuaWindow.cpp index 7fe87334..41edcc78 100644 --- a/src/config/lua/objects/LuaWindow.cpp +++ b/src/config/lua/objects/LuaWindow.cpp @@ -176,7 +176,7 @@ static int windowIndex(lua_State* L) { } const auto& tiledAlgo = algo->tiledAlgo(); - const std::string name = Layout::Supplementary::algoMatcher()->getNameForTiledAlgo(&typeid(*tiledAlgo.get())); + const std::string name = Layout::Supplementary::algoMatcher()->getNameForTiledAlgo(tiledAlgo.get()); lua_newtable(L); lua_pushstring(L, name.c_str()); diff --git a/src/config/lua/objects/LuaWorkspace.cpp b/src/config/lua/objects/LuaWorkspace.cpp index 3f89b41a..8cfb32e7 100644 --- a/src/config/lua/objects/LuaWorkspace.cpp +++ b/src/config/lua/objects/LuaWorkspace.cpp @@ -136,7 +136,7 @@ static int workspaceIndex(lua_State* L) { std::string layoutName = "unknown"; if (ws->m_space && ws->m_space->algorithm() && ws->m_space->algorithm()->tiledAlgo()) { const auto& TILED_ALGO = ws->m_space->algorithm()->tiledAlgo(); - layoutName = Layout::Supplementary::algoMatcher()->getNameForTiledAlgo(&typeid(*TILED_ALGO.get())); + layoutName = Layout::Supplementary::algoMatcher()->getNameForTiledAlgo(TILED_ALGO.get()); } lua_pushstring(L, layoutName.c_str()); } else if (key == "last_window") { -- cgit v1.2.3