From f23d3ebd92fdbaac107b71893fab94701c39eeb8 Mon Sep 17 00:00:00 2001 From: Chase Taylor <11805686+dotaxis@users.noreply.github.com> Date: Fri, 19 Jul 2024 12:53:57 -0600 Subject: [PATCH] hyprwinwrap: Fix crashing hyprland with some apps (#201) --- hyprwinwrap/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyprwinwrap/main.cpp b/hyprwinwrap/main.cpp index 1303277..51043a0 100644 --- a/hyprwinwrap/main.cpp +++ b/hyprwinwrap/main.cpp @@ -153,7 +153,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { for (auto& fn : fns) { if (!fn.demangled.contains("CSubsurface")) continue; - subsurfaceHook = HyprlandAPI::createFunctionHook(PHANDLE, fns[0].address, (void*)&onCommitSubsurface); + subsurfaceHook = HyprlandAPI::createFunctionHook(PHANDLE, fn.address, (void*)&onCommitSubsurface); } fns = HyprlandAPI::findFunctionsByName(PHANDLE, "listener_commitWindow"); @@ -176,4 +176,4 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { APICALL EXPORT void PLUGIN_EXIT() { ; -} \ No newline at end of file +}