Don't unnecessarily call alarm when duration is zero
This commit is contained in:
parent
e43bdb67a6
commit
30b0961b2e
4 changed files with 10 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
herbe
|
||||
.ccls-cache
|
||||
|
|
4
TODO.md
Normal file
4
TODO.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
* Handle multiple notifications at the same time
|
||||
* Properly handle duration = 0
|
||||
* Keyboard shortcut to dismiss and accept notifications (also mouse)
|
||||
* Properly print new lines
|
4
herbe.c
4
herbe.c
|
@ -67,7 +67,9 @@ int main(int argc, char *argv[])
|
|||
die("Usage: %s body", argv[0]);
|
||||
|
||||
signal(SIGALRM, expire);
|
||||
alarm(duration);
|
||||
|
||||
if (duration != 0)
|
||||
alarm(duration);
|
||||
|
||||
display = XOpenDisplay(0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue