From 2c7399e3590cccd23b834f4b76193d918be56bb4 Mon Sep 17 00:00:00 2001 From: Ashesh Ambasta Date: Wed, 27 May 2026 16:23:56 +0200 Subject: Skip root pixmap access when alpha == 255 When alpha is 255 (fully opaque), the pseudo-transparency blend factor is zero (0xFFFF - 257 * 255 = 0), making the root pixmap composite a visual no-op. However, drawBackground unconditionally calls XRenderCreatePicture on the _XROOTPMAP_ID pixmap. Wallpaper setters like feh free the old root pixmap via XKillClient each time they cycle to a new image. If xmobar attempts XRenderCreatePicture on the freed pixmap, the X server returns BadDrawable and the default error handler terminates xmobar. Guard the entire root pixmap code path with `when (alpha < 255)` so that fully opaque bars never touch _XROOTPMAP_ID. --- changelog.md | 1 + 1 file changed, 1 insertion(+) (limited to 'changelog.md') diff --git a/changelog.md b/changelog.md index aeb07e3..bc56e1d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ ## Version 0.51 (unrelease) +- Fix BadDrawable crash when wallpaper setters free the root pixmap while alpha is 255 - base dependency relaxed to 4.21 ## Version 0.50 (June, 2025) -- cgit v1.2.3