Fix using wrong getNodeFromWindow function with findFunctionsByName

This commit is contained in:
ItsDrike 2023-03-31 23:57:34 +02:00
parent 5c56bd64ed
commit 312eeaeb34
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -99,7 +99,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle)
// Get address of the private CHyprDwindleLayout::getNodeFromWindow member function, we'll need it in toggleGroup
static const auto METHODS = HyprlandAPI::findFunctionsByName(PHANDLE, "getNodeFromWindow");
g_pNodeFromWindow = (nodeFromWindowT)METHODS[0].address;
g_pNodeFromWindow = (nodeFromWindowT)METHODS[1].address;
originalToggleGroup = g_pKeybindManager->m_mDispatchers["togglegroup"];
HyprlandAPI::addDispatcher(PHANDLE, "togglegroup", toggleGroup);