aboutsummaryrefslogtreecommitdiff
path: root/libi3
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2021-03-05 11:44:09 +0100
committerUli Schlachter <psychon@znc.in>2021-03-06 09:27:15 +0100
commitf8bc7052ea342cab203a9758bdb988ffbce5e5de (patch)
treeba6bbe807d81cf4345b9f04695af2f198c47edaa /libi3
parent757b3dd5730f6298982ccec80a888ec681b70e2a (diff)
downloadi3-f8bc7052ea342cab203a9758bdb988ffbce5e5de.tar.gz
i3-f8bc7052ea342cab203a9758bdb988ffbce5e5de.zip
Remove unused member from surface_t
Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'libi3')
-rw-r--r--libi3/draw_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libi3/draw_util.c b/libi3/draw_util.c
index 18cd0459..ad2e6aa2 100644
--- a/libi3/draw_util.c
+++ b/libi3/draw_util.c
@@ -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);
}