int x, y, w, h, bw;
gboolean attr_mapped;
gboolean input_only;
- gboolean argb;
+ uint8_t depth;
xcb_visualid_t visual;
xcb_pixmap_t pixmap;
xcb_xfixes_region_t region;
w->w = rep->width;
w->h = rep->height;
w->bw = rep->border_width;
- w->argb = rep->depth == 32;
+ w->depth = rep->depth;
free(rep);
}
else {
w->x = w->y = -1;
w->w = w->h = 1;
w->bw = 0;
- w->argb = FALSE;
+ w->depth = 0;
}
if (err) {
printf("error getting geometry for window 0x%x\n", w->id);
gboolean
window_is_argb(d_window_t *pubw)
{
+ uint8_t depth = window_get_depth(pubw);
+ return depth == 32;
+}
+
+uint8_t
+window_get_depth(d_window_t *pubw)
+{
d_window_priv_t *w = (d_window_priv_t*)pubw;
if (w->waiting_geom)
window_get_geometry_reply(w);
- return w->argb;
+ return w->depth;
}
xcb_visualid_t