rendered paste body/* * groupRenderWindowTitle * */void groupRenderWindowTitle(CompScreen *s, GroupSelection *group){ //GROUP_SCREEN(s); //we will need it later for font options. cairo_text_extents_t extents; GroupTabBar *bar; cairo_t *cr; if (!group->tabBar || !group->topTab || !group->tabBar->cc || !group->tabBar->cc->cairo) return; groupClearCairoContext(group->tabBar->cc); bar = group->tabBar; cr = group->tabBar->cc->cairo; cairo_set_line_width(cr, 2); cairo_set_source_rgba(cr, 1.0f, 1.0f, 1.0f, 1.0f); cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(cr, 24); cairo_text_extents(cr, group->topTab->name, &extents); cairo_save(cr); cairo_move_to(cr, 10, 10); cairo_text_path(cr, group->topTab->name); cairo_fill_preserve(cr); cairo_set_source_rgba(cr, 1.0f, 0.0f, 0.0f, 1.0f); cairo_stroke(cr); cairo_restore(cr);}/* * groupPaintTabBar * */void groupPaintTabBar(GroupSelection * group){ if (!group->topTab || (group->tabBar->state == TabBarOff)) return; CompWindow *topTab = TOP_TAB(group); CompScreen *s = topTab->screen; GROUP_SCREEN(s); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // text enableTexture(s, &group->tabBar->cc->texture, COMP_TEXTURE_FILTER_FAST); glBegin(GL_QUADS); glTexCoord2f (0.0f, 0.0f); glVertex2i(group->tabBar->region->extents.x1, group->tabBar->region->extents.y1); glTexCoord2f (1.0f, 0.0f); glVertex2i(group->tabBar->region->extents.x2, group->tabBar->region->extents.y1); glTexCoord2f (1.0f, 1.0f); glVertex2i(group->tabBar->region->extents.x2, group->tabBar->region->extents.y2); glTexCoord2f (0.0f, 1.0f); glVertex2i(group->tabBar->region->extents.x1, group->tabBar->region->extents.y2); glEnd(); disableTexture(s, &group->tabBar->cc->texture); glColor4usv(defaultColor); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glDisable(GL_BLEND); glEnableClientState(GL_TEXTURE_COORD_ARRAY);}