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;