ec783b0480ed11261a105b583fa7f335f111a010

Author
outfoxxed <outfoxxed@outfoxxed.me>
Committer
outfoxxed <outfoxxed@outfoxxed.me>
Date

Message

Add notification for failed function hook

Diff

 1diff --git a/src/SelectionHook.cpp b/src/SelectionHook.cpp
 2index 19e131f8bec28a70b850e2f200cf7372e0e37491..13592f9cc70e1384b6f73a90d99131c024b83c55 100644
 3--- a/src/SelectionHook.cpp
 4+++ b/src/SelectionHook.cpp
 5@@ -26,6 +26,12 @@ void setup_selection_hook() {
 6 
 7 		if (decoUpdateCandidates.size() != 1) {
 8 			Debug::log(ERR, "Expected one matching function to hook for \"updateWindowAnimatedDecorationValues\", found %d", decoUpdateCandidates.size());
 9+			HyprlandAPI::addNotificationV2(PHANDLE, {
10+				{"text", "Failed to load function hooks: \"updateWindowAnimatedDecorationValues\""},
11+				{"time", (uint64_t)10000},
12+				{"color", CColor(1.0, 0.0, 0.0, 1.0)},
13+				{"icon", ICON_ERROR},
14+			});
15 			return;
16 		}
17