Conversation
xnotify.c
Outdated
| item->textw = queue->w - config.padding_pixels * 2; | ||
| } else { | ||
| item->textw = queue->w - config.image_pixels - config.padding_pixels * 3; | ||
| item->textw = MAX(1, queue->w - config.image_pixels - config.padding_pixels * 3); |
There was a problem hiding this comment.
I noticed this issue, which was already there on master. Basically, if you specify an image wider than the width of the notification, item->textw goes negative, and XCreatePixmap fails. I work around this by adding an extra 1 pixel for this scenario, but feel free to suggest a more elegant solution!
8782df0 to
d210a26
Compare
So I think I'll do like herbe and keep big patches as pull requests. I'll fix that bug, thanks for finding it! |
|
I did another change and I could not reproduce the bug here, can you try if the bug persists? |
d210a26 to
601c59a
Compare
Seems fixed. I've resolved the conflict as well. |
This PR introduces a flag (
-v) and Xresource (xnotify.vertical), which causes the image to be placed on top of the text instead of to the left of it.This introduces quite some changes, I hope I didn't break anything. I have tried to test it in all combinations I could think of (with/without image, vertical/not vertical, shrink/not shrink).