Remove redundant depth argument from x_con_init(). (#2323)

This commit is contained in:
Ingo Bürk 2016-05-05 14:18:27 +02:00 committed by Michael Stapelberg
parent 152318bccf
commit b2397c9f01
4 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@ extern xcb_window_t focused_id;
* every container from con_new(). * every container from con_new().
* *
*/ */
void x_con_init(Con *con, uint16_t depth); void x_con_init(Con *con);
/** /**
* Moves a child window from Container src to Container dest. * Moves a child window from Container src to Container dest.

View File

@ -68,7 +68,7 @@ Con *con_new_skeleton(Con *parent, i3Window *window) {
*/ */
Con *con_new(Con *parent, i3Window *window) { Con *con_new(Con *parent, i3Window *window) {
Con *new = con_new_skeleton(parent, window); Con *new = con_new_skeleton(parent, window);
x_con_init(new, new->depth); x_con_init(new);
return new; return new;
} }

View File

@ -150,7 +150,7 @@ static int json_end_map(void *ctx) {
LOG("attaching\n"); LOG("attaching\n");
con_attach(json_node, json_node->parent, true); con_attach(json_node, json_node->parent, true);
LOG("Creating window\n"); LOG("Creating window\n");
x_con_init(json_node, json_node->depth); x_con_init(json_node);
json_node = json_node->parent; json_node = json_node->parent;
} }

View File

@ -98,7 +98,7 @@ static con_state *state_for_frame(xcb_window_t window) {
* every container from con_new(). * every container from con_new().
* *
*/ */
void x_con_init(Con *con, uint16_t depth) { void x_con_init(Con *con) {
/* TODO: maybe create the window when rendering first? we could then even /* TODO: maybe create the window when rendering first? we could then even
* get the initial geometry right */ * get the initial geometry right */
@ -107,7 +107,7 @@ void x_con_init(Con *con, uint16_t depth) {
/* For custom visuals, we need to create a colormap before creating /* For custom visuals, we need to create a colormap before creating
* this window. It will be freed directly after creating the window. */ * this window. It will be freed directly after creating the window. */
xcb_visualid_t visual = get_visualid_by_depth(depth); xcb_visualid_t visual = get_visualid_by_depth(con->depth);
xcb_colormap_t win_colormap = xcb_generate_id(conn); xcb_colormap_t win_colormap = xcb_generate_id(conn);
xcb_create_colormap_checked(conn, XCB_COLORMAP_ALLOC_NONE, win_colormap, root, visual); xcb_create_colormap_checked(conn, XCB_COLORMAP_ALLOC_NONE, win_colormap, root, visual);
@ -133,7 +133,7 @@ void x_con_init(Con *con, uint16_t depth) {
values[4] = win_colormap; values[4] = win_colormap;
Rect dims = {-15, -15, 10, 10}; Rect dims = {-15, -15, 10, 10};
xcb_window_t frame_id = create_window(conn, dims, depth, visual, XCB_WINDOW_CLASS_INPUT_OUTPUT, XCURSOR_CURSOR_POINTER, false, mask, values); xcb_window_t frame_id = create_window(conn, dims, con->depth, visual, XCB_WINDOW_CLASS_INPUT_OUTPUT, XCURSOR_CURSOR_POINTER, false, mask, values);
draw_util_surface_init(conn, &(con->frame), frame_id, get_visualtype_by_id(visual), dims.width, dims.height); draw_util_surface_init(conn, &(con->frame), frame_id, get_visualtype_by_id(visual), dims.width, dims.height);
xcb_change_property(conn, xcb_change_property(conn,
XCB_PROP_MODE_REPLACE, XCB_PROP_MODE_REPLACE,