[draw/config] Cosmetics

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-09 13:26:02 +02:00
parent 28ca287d7d
commit 328a04fb17
3 changed files with 7 additions and 11 deletions

View File

@ -87,7 +87,7 @@ draw_iso2utf8(char *iso)
} }
static xcb_visualtype_t * static xcb_visualtype_t *
default_visual_from_screen(xcb_screen_t *s) draw_screen_default_visual(xcb_screen_t *s)
{ {
xcb_depth_iterator_t depth_iter; xcb_depth_iterator_t depth_iter;
xcb_visualtype_iterator_t visual_iter; xcb_visualtype_iterator_t visual_iter;
@ -124,7 +124,7 @@ draw_context_new(xcb_connection_t *conn, int phys_screen, int width, int height,
d->width = width; d->width = width;
d->height = height; d->height = height;
d->depth = s->root_depth; d->depth = s->root_depth;
d->visual = default_visual_from_screen(s); d->visual = draw_screen_default_visual(s);
d->drawable = dw; d->drawable = dw;
d->surface = cairo_xcb_surface_create(conn, dw, d->visual, width, height); d->surface = cairo_xcb_surface_create(conn, dw, d->visual, width, height);
d->cr = cairo_create(d->surface); d->cr = cairo_create(d->surface);
@ -163,7 +163,7 @@ draw_font_new(xcb_connection_t *conn, int phys_screen, char *fontname)
* order to get font informations */ * order to get font informations */
surface = cairo_xcb_surface_create(conn, surface = cairo_xcb_surface_create(conn,
phys_screen, phys_screen,
default_visual_from_screen(s), draw_screen_default_visual(s),
s->width_in_pixels, s->width_in_pixels,
s->height_in_pixels); s->height_in_pixels);
@ -486,7 +486,6 @@ draw_graph(DrawCtx *ctx, area_t rect, int *from, int *to, int cur_index,
} }
} }
else /* draw from left to right */ else /* draw from left to right */
{
while(++i < w) while(++i < w)
{ {
cairo_move_to(ctx->cr, x, y - from[cur_index]); cairo_move_to(ctx->cr, x, y - from[cur_index]);
@ -496,7 +495,6 @@ draw_graph(DrawCtx *ctx, area_t rect, int *from, int *to, int cur_index,
if (--cur_index < 0) if (--cur_index < 0)
cur_index = w - 1; cur_index = w - 1;
} }
}
cairo_stroke(ctx->cr); cairo_stroke(ctx->cr);
@ -880,7 +878,7 @@ draw_textwidth(xcb_connection_t *conn, int default_screen, font_t *font, const c
return 0; return 0;
surface = cairo_xcb_surface_create(conn, default_screen, surface = cairo_xcb_surface_create(conn, default_screen,
default_visual_from_screen(s), draw_screen_default_visual(s),
s->width_in_pixels, s->width_in_pixels,
s->height_in_pixels); s->height_in_pixels);
cr = cairo_create(surface); cr = cairo_create(surface);

View File

@ -22,8 +22,6 @@
#ifndef AWESOME_COMMON_VERSION_H #ifndef AWESOME_COMMON_VERSION_H
#define AWESOME_COMMON_VERSION_H #define AWESOME_COMMON_VERSION_H
void void eprint_version(const char *const executable) __attribute__ ((noreturn));
eprint_version(const char *const executable)
__attribute__ ((noreturn));
#endif #endif