From c1971c8096663da01a190a215346913a6877427e Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Sun, 16 Aug 2026 15:45:09 +0900 Subject: [PATCH] fix(popup): accept depth-24 roots regardless of colormap precision bits_per_rgb_value is the colormap component precision, not the pixel layout; the NVIDIA driver reports 11 for its ordinary x8r8g8b8 visuals, which left the popup disabled there. Depth, class, masks, byte order and the pixmap format already pin the layout that putimage writes. --- win.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/win.c b/win.c index 256bbed..97816d1 100644 --- a/win.c +++ b/win.c @@ -53,9 +53,8 @@ validformat(xcb_connection_t *c, xcb_screen_t *s) setup = xcb_get_setup(c); v = getvisual(s); - if(setup == nil || v == nil || s->root_depth != 24 || + if(v == nil || s->root_depth != 24 || v->_class != XCB_VISUAL_CLASS_TRUE_COLOR || - v->bits_per_rgb_value != 8 || v->red_mask != 0xff0000 || v->green_mask != 0x00ff00 || v->blue_mask != 0x0000ff) return 0;