Remove unused member from surface_t

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2021-03-05 11:44:09 +01:00
parent 757b3dd573
commit f8bc7052ea
2 changed files with 4 additions and 4 deletions

View File

@ -566,8 +566,6 @@ typedef struct surface_t {
/* A classic XCB graphics context. */
xcb_gcontext_t gc;
xcb_visualtype_t *visual_type;
int width;
int height;

View File

@ -35,10 +35,12 @@ static void draw_util_set_source_color(surface_t *surface, color_t color);
void draw_util_surface_init(xcb_connection_t *conn, surface_t *surface, xcb_drawable_t drawable,
xcb_visualtype_t *visual, int width, int height) {
surface->id = drawable;
surface->visual_type = ((visual == NULL) ? visual_type : visual);
surface->width = width;
surface->height = height;
if (visual == NULL)
visual = visual_type;
surface->gc = xcb_generate_id(conn);
xcb_void_cookie_t gc_cookie = xcb_create_gc_checked(conn, surface->gc, surface->id, 0, NULL);
@ -47,7 +49,7 @@ void draw_util_surface_init(xcb_connection_t *conn, surface_t *surface, xcb_draw
ELOG("Could not create graphical context. Error code: %d. Please report this bug.\n", error->error_code);
}
surface->surface = cairo_xcb_surface_create(conn, surface->id, surface->visual_type, width, height);
surface->surface = cairo_xcb_surface_create(conn, surface->id, visual, width, height);
surface->cr = cairo_create(surface->surface);
}