From 66f03d3a08a298e5f2d835e82cb7ad92a6309a31 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Thu, 5 Oct 2023 14:35:11 +0200 Subject: [PATCH] Remove prefix newlines from demangled func name The demangled function names from HyprlandAPI::findFunctionsByName were originally always returning a string prefixed with a newline character. This was fixed in Hyprland since https://github.com/hyprwm/Hyprland/commit/1afb00a01b7cab3e68f5af3ca6a7d7d86b8f913e so the newline char can now be removed. --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b836ddb..e66ea23 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,9 +33,9 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) Debug::log(LOG, "[dwindle-autogroup] Loading Hyprland functions"); // Find pointers to functions by name (from the Hyprland binary) - g_pNodeFromWindow = (nodeFromWindowFuncT)findHyprlandFunction("getNodeFromWindow", "\nCHyprDwindleLayout::getNodeFromWindow(CWindow*)"); - auto pCreateGroup = findHyprlandFunction("createGroup", "\nCWindow::createGroup()"); - auto pDestroyGroup = findHyprlandFunction("destroyGroup", "\nCWindow::destroyGroup()"); + g_pNodeFromWindow = (nodeFromWindowFuncT)findHyprlandFunction("getNodeFromWindow", "CHyprDwindleLayout::getNodeFromWindow(CWindow*)"); + auto pCreateGroup = findHyprlandFunction("createGroup", "CWindow::createGroup()"); + auto pDestroyGroup = findHyprlandFunction("destroyGroup", "CWindow::destroyGroup()"); // Return immediately if one of the functions wasn't found if (!g_pNodeFromWindow || !pCreateGroup || !pDestroyGroup) {