hyprwinwrap: Fix crashing hyprland with some apps (#201)

This commit is contained in:
Chase Taylor 2024-07-19 12:53:57 -06:00 committed by GitHub
parent 928164d6d2
commit f23d3ebd92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -153,7 +153,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
for (auto& fn : fns) { for (auto& fn : fns) {
if (!fn.demangled.contains("CSubsurface")) if (!fn.demangled.contains("CSubsurface"))
continue; continue;
subsurfaceHook = HyprlandAPI::createFunctionHook(PHANDLE, fns[0].address, (void*)&onCommitSubsurface); subsurfaceHook = HyprlandAPI::createFunctionHook(PHANDLE, fn.address, (void*)&onCommitSubsurface);
} }
fns = HyprlandAPI::findFunctionsByName(PHANDLE, "listener_commitWindow"); fns = HyprlandAPI::findFunctionsByName(PHANDLE, "listener_commitWindow");
@ -176,4 +176,4 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
APICALL EXPORT void PLUGIN_EXIT() { APICALL EXPORT void PLUGIN_EXIT() {
; ;
} }