From 1d94af414008a23b3e3f2e869700784a2b118ba9 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 8 Apr 2024 17:57:08 +0100 Subject: [PATCH] backend: document my confusion See e3e73d7fc1259cc269b90894271af0682bdccdc9 The reason composing worked without using the mask image is because the paint region already carves the relevant parts of shaped windows. Signed-off-by: Yuxuan Shui --- src/backend/backend.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/backend.c b/src/backend/backend.c index 7db4f8ec..2caffbee 100644 --- a/src/backend/backend.c +++ b/src/backend/backend.c @@ -441,6 +441,9 @@ bool paint_all_new(session_t *ps, struct managed_win *const t) { // Draw window on target if (w->frame_opacity == 1) { + // We use both reg_paint_in_bound and mask image, which is + // probably no strictly necessary. Even for shaped windows, they + // should be the same. ps->backend_data->ops->compose( ps->backend_data, w->win_image, window_coord, w->mask_image, window_coord, ®_paint_in_bound, ®_visible);