summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/X11/XRender.hsc
AgeCommit message (Collapse)Author
2026-05-29Skip root pixmap access when alpha == 255Ashesh Ambasta
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.
2022-09-11cairo: alpha (still pseudo, via xrender)jao