diff --git a/bar.c b/bar.c index 6682e72..14d988d 100644 --- a/bar.c +++ b/bar.c @@ -963,41 +963,8 @@ get_xinerama_monitors (void) xcb_visualid_t get_visual (void) { - - xcb_depth_iterator_t depth_iter; - - depth_iter = xcb_screen_allowed_depths_iterator (scr); - for (; depth_iter.rem; xcb_depth_next (&depth_iter)) { - xcb_visualtype_iterator_t visual_iter; - - visual_iter = xcb_depth_visuals_iterator (depth_iter.data); - for (; visual_iter.rem; xcb_visualtype_next (&visual_iter)) { - if (scr->root_visual == visual_iter.data->visual_id) { - visual_ptr = visual_iter.data; - break; - } - } - } visual_ptr = DefaultVisual(dpy, scr_nbr); return scr->root_visual; //scr->root_visual; - /* - xcb_depth_iterator_t iter; - - iter = xcb_screen_allowed_depths_iterator(scr); - */ - /* Try to find a RGBA visual */ - /* while (iter.rem) { - xcb_visualtype_t *vis = xcb_depth_visuals(iter.data); - - if (iter.data->depth == 32) { - visual_ptr = vis; - return vis->visual_id; - } - - xcb_depth_next(&iter); - } - */ - /* Fallback to the default one */ } void