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.
This commit is contained in:
2026-08-16 15:45:09 +09:00
parent 7047c57d29
commit c1971c8096

3
win.c
View File

@@ -53,9 +53,8 @@ validformat(xcb_connection_t *c, xcb_screen_t *s)
setup = xcb_get_setup(c); setup = xcb_get_setup(c);
v = getvisual(s); 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->_class != XCB_VISUAL_CLASS_TRUE_COLOR ||
v->bits_per_rgb_value != 8 ||
v->red_mask != 0xff0000 || v->green_mask != 0x00ff00 || v->red_mask != 0xff0000 || v->green_mask != 0x00ff00 ||
v->blue_mask != 0x0000ff) v->blue_mask != 0x0000ff)
return 0; return 0;