1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-30 06:16:47 +02:00

Fix race condition when window is closed with active notifications

A ToxWindow's notifications need to be halted before the window is freed
This commit is contained in:
jfreegman
2020-11-10 17:20:40 -05:00
parent 16bcb27ca7
commit 752fc6d619
4 changed files with 41 additions and 6 deletions

View File

@ -62,6 +62,9 @@ typedef enum _Flags {
int init_notify(int login_cooldown, int notification_timeout);
void terminate_notify(void);
/* Kills all notifications for `id`. This must be called before freeing a ToxWindow. */
void kill_notifs(int id);
int sound_notify(ToxWindow *self, Notification notif, uint64_t flags, int *id_indicator);
int sound_notify2(ToxWindow *self, Notification notif, uint64_t flags, int id);