summaryrefslogtreecommitdiff
path: root/src/entry_backend/harfbuzz.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/entry_backend/harfbuzz.c')
-rw-r--r--src/entry_backend/harfbuzz.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/entry_backend/harfbuzz.c b/src/entry_backend/harfbuzz.c
index af1aad7..db3be66 100644
--- a/src/entry_backend/harfbuzz.c
+++ b/src/entry_backend/harfbuzz.c
@@ -257,7 +257,10 @@ void entry_backend_harfbuzz_update(struct entry *entry)
cairo_save(cr);
color = entry->selection_background_color;
cairo_set_source_rgba(cr, color.r, color.g, color.b, color.a);
- cairo_rectangle(cr, 0, 0, width, font_extents.height);
+ uint32_t pad = entry->selection_background_padding;
+ cairo_translate(cr, -pad, 0);
+ cairo_rectangle(cr, 0, 0, width + pad * 2, font_extents.height);
+ cairo_translate(cr, pad, 0);
cairo_fill(cr);
cairo_restore(cr);
cairo_paint(cr);