Skip to content

Concatenated queues#541

Merged
tsipinakis merged 6 commits into
dunst-project:masterfrom
bebehei:concatenated-queues
Sep 14, 2018
Merged

Concatenated queues#541
tsipinakis merged 6 commits into
dunst-project:masterfrom
bebehei:concatenated-queues

Conversation

@bebehei
Copy link
Copy Markdown
Member

@bebehei bebehei commented Sep 6, 2018

Let important notifications seep into displayed even if the display queue is full.

By checking the joint of both queues, if you concatenate now the waiting and display queues, the concatenated queue is still sorted. A push to waiting and queues_update() should show the important notifications even if there if display is full.

Previously, this would have required a timeout of a notification in the displayed queue. Now it works immediately.

Fixes #431
Fixes #467

@bebehei bebehei added this to the v1.4.0 milestone Sep 6, 2018
@bebehei bebehei requested a review from tsipinakis September 6, 2018 07:53
@bebehei bebehei force-pushed the concatenated-queues branch from f8113b7 to 8b16ef5 Compare September 6, 2018 10:16
@bebehei
Copy link
Copy Markdown
Member Author

bebehei commented Sep 6, 2018

So, while working on the queues, I also had an idea for #467. So, I've pushed additionally a fix for #467

Now, two issues are addressed, which are which are important to the 1.4 release! 💪

@bebehei
Copy link
Copy Markdown
Member Author

bebehei commented Sep 10, 2018

@tsipinakis I'd love to see your review 😉

@tsipinakis
Copy link
Copy Markdown
Member

Sorry, I've tried to review this twice already but both times there's something bothering me with the way this is implemented but at the same time I can't think of a better way to do it. I'll look into it more tomorrow.

Comment thread src/queues.c Outdated
Comment thread src/queues.c Outdated
Comment thread src/queues.c Outdated
Comment thread src/draw.c Outdated
@tsipinakis
Copy link
Copy Markdown
Member

Somehow I submitted the review before I was actually done, oops!

Works fine from what I can tell, so my nitpicks this time are about simplifying the code :p

Comment thread src/queues.c Outdated
@bebehei bebehei force-pushed the concatenated-queues branch 2 times, most recently from 464e76a to a296581 Compare September 12, 2018 16:31
When the display queue had is full and a new notification would come
in, new notification wouldn't get shown until a currently displayed
notification would timeout.

Even if the notification would have been shown on top of the displayed
queue. So e.g. if the displayed queue would have been filled with
"normal" urgency notifications, an incoming "urgent" notification would
have been delayed.

To let those more important notifications through, the tail of displayed
and head of waiting are swapped on every update if necessary.
@bebehei bebehei force-pushed the concatenated-queues branch from a296581 to 60bc134 Compare September 13, 2018 09:38
For the case, that there is a single notification waiting in queue, the
xmore layout is an annoying setting.
Using the last notification from displayed creates confusion about
nonexisting notifications.
@bebehei bebehei force-pushed the concatenated-queues branch 3 times, most recently from c76c254 to 97434f0 Compare September 13, 2018 10:19
@bebehei bebehei requested a review from tsipinakis September 13, 2018 10:19
@bebehei
Copy link
Copy Markdown
Member Author

bebehei commented Sep 13, 2018

@tsipinakis I've simplyfied the code now and polished the commits. I'd consider it final now. A review would be great! Thanks!

Comment thread src/queues.c
Comment thread src/queues.c Outdated
Comment thread src/queues.c
On actions, where waiting and displayed has to get traversed, traverse
them both in a single loop. Code duplication isn't necessary anymore.
@bebehei bebehei force-pushed the concatenated-queues branch from 97434f0 to e1ee87b Compare September 14, 2018 13:37
@tsipinakis tsipinakis merged commit fab2543 into dunst-project:master Sep 14, 2018
@bebehei bebehei mentioned this pull request Sep 25, 2018
@bebehei bebehei deleted the concatenated-queues branch October 1, 2018 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants