jcs
/wallops
/amendments
/23
notify: Don't cancel a notification we haven't posted
jcs made amendment 23 over 2 years ago
--- main.c Tue Feb 8 21:36:32 2022
+++ main.c Tue Feb 8 22:05:03 2022
@@ -507,7 +507,6 @@ hide_focusable(struct focusable *focusable)
void
notify(void)
{
- cancel_notification();
memset(¬ification, 0, sizeof(notification));
notification.qType = nmType;
notification.nmMark = 1;
@@ -519,5 +518,7 @@ notify(void)
void
cancel_notification(void)
{
- NMRemove(¬ification);
+ if (notification.qType)
+ NMRemove(¬ification);
+ memset(¬ification, 0, sizeof(notification));
}