summaryrefslogtreecommitdiff
path: root/qutebrowser
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-04-09 17:11:30 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-04-09 17:14:26 +0200
commit908abb6566027d9d09fb7079738c3edcdd9ceb0a (patch)
treef16f408adc37a11dfa3fa5c0e463f881dd515d47 /qutebrowser
parentdc14d314c424a8d9ddf2e8e8c98d6d663e26cf38 (diff)
downloadqutebrowser-908abb6566027d9d09fb7079738c3edcdd9ceb0a.tar.gz
qutebrowser-908abb6566027d9d09fb7079738c3edcdd9ceb0a.zip
notifications: Fix image padding assertion
The underlying Chromium pads images so that scanlines align on 4-byte boundaries. Thus, with an image size of e.g. 239x239, we'll have 3 bytes of padding (239 mod 4 = 3; 240 mod 4 = 0). Fixes #6375
Diffstat (limited to 'qutebrowser')
-rw-r--r--qutebrowser/browser/webengine/notification.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/qutebrowser/browser/webengine/notification.py b/qutebrowser/browser/webengine/notification.py
index 682d64bdc..36493f4f7 100644
--- a/qutebrowser/browser/webengine/notification.py
+++ b/qutebrowser/browser/webengine/notification.py
@@ -1029,7 +1029,7 @@ class DBusNotificationAdapter(AbstractNotificationAdapter):
# Source:
# https://github.com/dunst-project/dunst/blob/v1.6.1/src/icon.c#L292-L309
padding = bytes_per_line - width * channel_count
- assert 0 <= padding < 3, (padding, bytes_per_line, width, channel_count)
+ assert 0 <= padding <= 3, (padding, bytes_per_line, width, channel_count)
size -= padding
if padding and self._quirks.no_padded_images: