From 9504e97ccf9e4df64da446ffa5ce070ef55b69f2 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Sun, 23 Feb 2025 14:59:13 +1100
Subject: notifpopups: go to notif center on click

---
 src/modules/notifpopups.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'src/modules/notifpopups.tsx')

diff --git a/src/modules/notifpopups.tsx b/src/modules/notifpopups.tsx
index 53217c0..c3f687a 100644
--- a/src/modules/notifpopups.tsx
+++ b/src/modules/notifpopups.tsx
@@ -30,8 +30,12 @@ export default () => (
 
                     self.add(
                         <eventbox
-                            // Dismiss on middle click
-                            onClick={(_, event) => event.button === Astal.MouseButton.MIDDLE && notification.dismiss()}
+                            onClick={(_, event) => {
+                                // Go to notif center on primary click
+                                if (event.button === Astal.MouseButton.PRIMARY) App.get_window("notifications")?.show();
+                                // Dismiss on middle click
+                                else if (event.button === Astal.MouseButton.MIDDLE) notification.dismiss();
+                            }}
                             // Close on hover lost
                             onHoverLost={() => popup.destroyWithAnims()}
                         >
-- 
cgit v1.2.3-freya

