remove/shorten a lot of debugging messages

Some of them are useless nowadays, others very unlikely to be a problem.
Those which might still be interesting somewhen in the future are just
commented out.
This commit is contained in:
Michael Stapelberg 2011-10-23 00:15:13 +01:00
parent 42d355f2b7
commit 10d3281b0f
9 changed files with 28 additions and 78 deletions

View File

@ -15,7 +15,7 @@
* *
*/ */
void run_assignments(i3Window *window) { void run_assignments(i3Window *window) {
DLOG("Checking assignments...\n"); DLOG("Checking if any assignments matches this window\n");
/* Check if any assignments match */ /* Check if any assignments match */
Assignment *current; Assignment *current;

View File

@ -193,7 +193,6 @@ void con_focus(Con *con) {
con->urgent = false; con->urgent = false;
workspace_update_urgent_flag(con_get_workspace(con)); workspace_update_urgent_flag(con_get_workspace(con));
} }
DLOG("con_focus done = %p\n", con);
} }
/* /*
@ -404,8 +403,8 @@ Con *con_by_frame_id(xcb_window_t frame) {
Con *con_for_window(Con *con, i3Window *window, Match **store_match) { Con *con_for_window(Con *con, i3Window *window, Match **store_match) {
Con *child; Con *child;
Match *match; Match *match;
DLOG("searching con for window %p starting at con %p\n", window, con); //DLOG("searching con for window %p starting at con %p\n", window, con);
DLOG("class == %s\n", window->class_class); //DLOG("class == %s\n", window->class_class);
TAILQ_FOREACH(child, &(con->nodes_head), nodes) { TAILQ_FOREACH(child, &(con->nodes_head), nodes) {
TAILQ_FOREACH(match, &(child->swallow_head), matches) { TAILQ_FOREACH(match, &(child->swallow_head), matches) {

View File

@ -112,7 +112,6 @@ void ewmh_update_workarea() {
* *
*/ */
void ewmh_update_client_list_stacking(xcb_window_t *stack, int num_windows) { void ewmh_update_client_list_stacking(xcb_window_t *stack, int num_windows) {
DLOG("Updating _NET_CLIENT_LIST_STACKING\n");
xcb_change_property( xcb_change_property(
conn, conn,
XCB_PROP_MODE_REPLACE, XCB_PROP_MODE_REPLACE,

View File

@ -684,7 +684,7 @@ static void handle_client_message(xcb_client_message_event_t *event) {
xcb_flush(conn); xcb_flush(conn);
free(reply); free(reply);
} else { } else {
ELOG("unhandled clientmessage\n"); DLOG("unhandled clientmessage\n");
return; return;
} }
} }
@ -1017,7 +1017,7 @@ static void property_notify(uint8_t state, xcb_window_t window, xcb_atom_t atom)
} }
if (handler == NULL) { if (handler == NULL) {
DLOG("Unhandled property notify for atom %d (0x%08x)\n", atom, atom); //DLOG("Unhandled property notify for atom %d (0x%08x)\n", atom, atom);
return; return;
} }
@ -1098,15 +1098,15 @@ void handle_event(int type, xcb_generic_event_t *event) {
handle_focus_in((xcb_focus_in_event_t*)event); handle_focus_in((xcb_focus_in_event_t*)event);
break; break;
case XCB_PROPERTY_NOTIFY: case XCB_PROPERTY_NOTIFY: {
DLOG("Property notify\n");
xcb_property_notify_event_t *e = (xcb_property_notify_event_t*)event; xcb_property_notify_event_t *e = (xcb_property_notify_event_t*)event;
last_timestamp = e->time; last_timestamp = e->time;
property_notify(e->state, e->window, e->atom); property_notify(e->state, e->window, e->atom);
break; break;
}
default: default:
DLOG("Unhandled event of type %d\n", type); //DLOG("Unhandled event of type %d\n", type);
break; break;
} }
} }

View File

@ -77,8 +77,6 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
xcb_get_geometry_reply_t *geom; xcb_get_geometry_reply_t *geom;
xcb_get_window_attributes_reply_t *attr = NULL; xcb_get_window_attributes_reply_t *attr = NULL;
DLOG("---> looking at window 0x%08x\n", window);
xcb_get_property_cookie_t wm_type_cookie, strut_cookie, state_cookie, xcb_get_property_cookie_t wm_type_cookie, strut_cookie, state_cookie,
utf8_title_cookie, title_cookie, utf8_title_cookie, title_cookie,
class_cookie, leader_cookie, transient_cookie, class_cookie, leader_cookie, transient_cookie,
@ -100,13 +98,11 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
} }
if (needs_to_be_mapped && attr->map_state != XCB_MAP_STATE_VIEWABLE) { if (needs_to_be_mapped && attr->map_state != XCB_MAP_STATE_VIEWABLE) {
DLOG("map_state unviewable\n");
FREE_GEOMETRY(); FREE_GEOMETRY();
goto out; goto out;
} }
/* Dont manage clients with the override_redirect flag */ /* Dont manage clients with the override_redirect flag */
DLOG("override_redirect is %d\n", attr->override_redirect);
if (attr->override_redirect) { if (attr->override_redirect) {
FREE_GEOMETRY(); FREE_GEOMETRY();
goto out; goto out;
@ -148,7 +144,7 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
startup_id_cookie = GET_PROPERTY(A__NET_STARTUP_ID, 512); startup_id_cookie = GET_PROPERTY(A__NET_STARTUP_ID, 512);
/* TODO: also get wm_normal_hints here. implement after we got rid of xcb-event */ /* TODO: also get wm_normal_hints here. implement after we got rid of xcb-event */
DLOG("reparenting!\n"); DLOG("Managing window 0x%08x\n", window);
i3Window *cwindow = scalloc(sizeof(i3Window)); i3Window *cwindow = scalloc(sizeof(i3Window));
cwindow->id = window; cwindow->id = window;

View File

@ -73,14 +73,13 @@ void match_copy(Match *dest, Match *src) {
* *
*/ */
bool match_matches_window(Match *match, i3Window *window) { bool match_matches_window(Match *match, i3Window *window) {
LOG("checking window %d (%s)\n", window->id, window->class_class); LOG("Checking window 0x%08x (class %s)\n", window->id, window->class_class);
if (match->class != NULL) { if (match->class != NULL) {
if (window->class_class != NULL && if (window->class_class != NULL &&
regex_matches(match->class, window->class_class)) { regex_matches(match->class, window->class_class)) {
LOG("window class matches (%s)\n", window->class_class); LOG("window class matches (%s)\n", window->class_class);
} else { } else {
LOG("window class does not match\n");
return false; return false;
} }
} }
@ -90,7 +89,6 @@ bool match_matches_window(Match *match, i3Window *window) {
regex_matches(match->instance, window->class_instance)) { regex_matches(match->instance, window->class_instance)) {
LOG("window instance matches (%s)\n", window->class_instance); LOG("window instance matches (%s)\n", window->class_instance);
} else { } else {
LOG("window instance does not match\n");
return false; return false;
} }
} }
@ -109,7 +107,6 @@ bool match_matches_window(Match *match, i3Window *window) {
regex_matches(match->title, window->name_json)) { regex_matches(match->title, window->name_json)) {
LOG("title matches (%s)\n", window->name_json); LOG("title matches (%s)\n", window->name_json);
} else { } else {
LOG("title does not match\n");
return false; return false;
} }
} }
@ -119,13 +116,11 @@ bool match_matches_window(Match *match, i3Window *window) {
regex_matches(match->role, window->role)) { regex_matches(match->role, window->role)) {
LOG("window_role matches (%s)\n", window->role); LOG("window_role matches (%s)\n", window->role);
} else { } else {
LOG("window_role does not match\n");
return false; return false;
} }
} }
if (match->dock != -1) { if (match->dock != -1) {
LOG("match->dock = %d, window->dock = %d\n", match->dock, window->dock);
if ((window->dock == W_DOCK_TOP && match->dock == M_DOCK_TOP) || if ((window->dock == W_DOCK_TOP && match->dock == M_DOCK_TOP) ||
(window->dock == W_DOCK_BOTTOM && match->dock == M_DOCK_BOTTOM) || (window->dock == W_DOCK_BOTTOM && match->dock == M_DOCK_BOTTOM) ||
((window->dock == W_DOCK_TOP || window->dock == W_DOCK_BOTTOM) && ((window->dock == W_DOCK_TOP || window->dock == W_DOCK_BOTTOM) &&

View File

@ -25,7 +25,6 @@ static void render_l_output(Con *con) {
int x = con->rect.x; int x = con->rect.x;
int y = con->rect.y; int y = con->rect.y;
int height = con->rect.height; int height = con->rect.height;
DLOG("Available height: %d\n", height);
/* Find the content container and ensure that there is exactly one. Also /* Find the content container and ensure that there is exactly one. Also
* check for any non-CT_DOCKAREA clients. */ * check for any non-CT_DOCKAREA clients. */
@ -51,7 +50,6 @@ static void render_l_output(Con *con) {
Con *ws = con_get_fullscreen_con(content, CF_OUTPUT); Con *ws = con_get_fullscreen_con(content, CF_OUTPUT);
Con *fullscreen = con_get_fullscreen_con(ws, CF_OUTPUT); Con *fullscreen = con_get_fullscreen_con(ws, CF_OUTPUT);
if (fullscreen) { if (fullscreen) {
DLOG("got fs node: %p\n", fullscreen);
fullscreen->rect = con->rect; fullscreen->rect = con->rect;
x_raise_con(fullscreen); x_raise_con(fullscreen);
render_con(fullscreen, true); render_con(fullscreen, true);
@ -67,13 +65,10 @@ static void render_l_output(Con *con) {
child->rect.height = 0; child->rect.height = 0;
TAILQ_FOREACH(dockchild, &(child->nodes_head), nodes) TAILQ_FOREACH(dockchild, &(child->nodes_head), nodes)
child->rect.height += dockchild->geometry.height; child->rect.height += dockchild->geometry.height;
DLOG("This dockarea's height: %d\n", child->rect.height);
height -= child->rect.height; height -= child->rect.height;
} }
DLOG("Remaining: %d\n", height);
/* Second pass: Set the widths/heights */ /* Second pass: Set the widths/heights */
TAILQ_FOREACH(child, &(con->nodes_head), nodes) { TAILQ_FOREACH(child, &(con->nodes_head), nodes) {
if (child->type == CT_CON) { if (child->type == CT_CON) {
@ -96,7 +91,6 @@ static void render_l_output(Con *con) {
DLOG("child at (%d, %d) with (%d x %d)\n", DLOG("child at (%d, %d) with (%d x %d)\n",
child->rect.x, child->rect.y, child->rect.width, child->rect.height); child->rect.x, child->rect.y, child->rect.width, child->rect.height);
DLOG("x now %d, y now %d\n", x, y);
x_raise_con(child); x_raise_con(child);
render_con(child, false); render_con(child, false);
} }
@ -111,10 +105,10 @@ static void render_l_output(Con *con) {
* *
*/ */
void render_con(Con *con, bool render_fullscreen) { void render_con(Con *con, bool render_fullscreen) {
DLOG("currently rendering node %p / %s / layout %d\n",
con, con->name, con->layout);
int children = con_num_children(con); int children = con_num_children(con);
DLOG("children: %d, orientation = %d\n", children, con->orientation); DLOG("Rendering %snode %p / %s / layout %d / children %d / orient %d\n",
(render_fullscreen ? "fullscreen " : ""), con, con->name, con->layout,
children, con->orientation);
/* Copy container rect, subtract container border */ /* Copy container rect, subtract container border */
/* This is the actually usable space inside this container for clients */ /* This is the actually usable space inside this container for clients */
@ -145,16 +139,13 @@ void render_con(Con *con, bool render_fullscreen) {
if (!render_fullscreen) if (!render_fullscreen)
*inset = rect_add(*inset, con_border_style_rect(con)); *inset = rect_add(*inset, con_border_style_rect(con));
DLOG("Starting with inset = (%d, %d) %d x %d\n", inset->x, inset->y, inset->width, inset->height);
/* Obey x11 border */ /* Obey x11 border */
DLOG("X11 border: %d\n", con->border_width);
inset->width -= (2 * con->border_width); inset->width -= (2 * con->border_width);
inset->height -= (2 * con->border_width); inset->height -= (2 * con->border_width);
/* Obey the aspect ratio, if any */ /* Obey the aspect ratio, if any */
if (con->proportional_height != 0 && if (con->proportional_height != 0 &&
con->proportional_width != 0) { con->proportional_width != 0) {
DLOG("proportional height = %d, width = %d\n", con->proportional_height, con->proportional_width);
double new_height = inset->height + 1; double new_height = inset->height + 1;
int new_width = inset->width; int new_width = inset->width;
@ -170,7 +161,6 @@ void render_con(Con *con, bool render_fullscreen) {
inset->height = new_height; inset->height = new_height;
inset->width = new_width; inset->width = new_width;
DLOG("new_height = %f, new_width = %d\n", new_height, new_width);
} }
if (con->height_increment > 1) { if (con->height_increment > 1) {
@ -196,7 +186,6 @@ void render_con(Con *con, bool render_fullscreen) {
fullscreen = con_get_fullscreen_con(con, (con->type == CT_ROOT ? CF_GLOBAL : CF_OUTPUT)); fullscreen = con_get_fullscreen_con(con, (con->type == CT_ROOT ? CF_GLOBAL : CF_OUTPUT));
} }
if (fullscreen) { if (fullscreen) {
DLOG("got fs node: %p\n", fullscreen);
fullscreen->rect = rect; fullscreen->rect = rect;
x_raise_con(fullscreen); x_raise_con(fullscreen);
render_con(fullscreen, true); render_con(fullscreen, true);
@ -232,7 +221,6 @@ void render_con(Con *con, bool render_fullscreen) {
if (con->layout == L_OUTPUT) { if (con->layout == L_OUTPUT) {
render_l_output(con); render_l_output(con);
} else if (con->type == CT_ROOT) { } else if (con->type == CT_ROOT) {
DLOG("Root node, rendering outputs\n");
Con *child; Con *child;
TAILQ_FOREACH(child, &(con->nodes_head), nodes) { TAILQ_FOREACH(child, &(con->nodes_head), nodes) {
render_con(child, false); render_con(child, false);
@ -262,7 +250,6 @@ void render_con(Con *con, bool render_fullscreen) {
/* first we have the decoration, if this is a leaf node */ /* first we have the decoration, if this is a leaf node */
if (con_is_leaf(child) && child->border_style == BS_NORMAL) { if (con_is_leaf(child) && child->border_style == BS_NORMAL) {
DLOG("that child is a leaf node, subtracting deco\n");
/* TODO: make a function for relative coords? */ /* TODO: make a function for relative coords? */
child->deco_rect.x = child->rect.x - con->rect.x; child->deco_rect.x = child->rect.x - con->rect.x;
child->deco_rect.y = child->rect.y - con->rect.y; child->deco_rect.y = child->rect.y - con->rect.y;
@ -277,7 +264,6 @@ void render_con(Con *con, bool render_fullscreen) {
/* stacked layout */ /* stacked layout */
else if (con->layout == L_STACKED) { else if (con->layout == L_STACKED) {
DLOG("stacked con\n");
child->rect.x = x; child->rect.x = x;
child->rect.y = y; child->rect.y = y;
child->rect.width = rect.width; child->rect.width = rect.width;
@ -296,7 +282,6 @@ void render_con(Con *con, bool render_fullscreen) {
/* tabbed layout */ /* tabbed layout */
else if (con->layout == L_TABBED) { else if (con->layout == L_TABBED) {
DLOG("tabbed con\n");
child->rect.x = x; child->rect.x = x;
child->rect.y = y; child->rect.y = y;
child->rect.width = rect.width; child->rect.width = rect.width;
@ -315,7 +300,6 @@ void render_con(Con *con, bool render_fullscreen) {
/* dockarea layout */ /* dockarea layout */
else if (con->layout == L_DOCKAREA) { else if (con->layout == L_DOCKAREA) {
DLOG("dockarea con\n");
child->rect.x = x; child->rect.x = x;
child->rect.y = y; child->rect.y = y;
child->rect.width = rect.width; child->rect.width = rect.width;
@ -330,7 +314,6 @@ void render_con(Con *con, bool render_fullscreen) {
DLOG("child at (%d, %d) with (%d x %d)\n", DLOG("child at (%d, %d) with (%d x %d)\n",
child->rect.x, child->rect.y, child->rect.width, child->rect.height); child->rect.x, child->rect.y, child->rect.width, child->rect.height);
DLOG("x now %d, y now %d\n", x, y);
x_raise_con(child); x_raise_con(child);
render_con(child, false); render_con(child, false);
i++; i++;
@ -338,12 +321,9 @@ void render_con(Con *con, bool render_fullscreen) {
/* in a stacking or tabbed container, we ensure the focused client is raised */ /* in a stacking or tabbed container, we ensure the focused client is raised */
if (con->layout == L_STACKED || con->layout == L_TABBED) { if (con->layout == L_STACKED || con->layout == L_TABBED) {
DLOG("stacked/tabbed, raising focused reverse\n");
TAILQ_FOREACH_REVERSE(child, &(con->focus_head), focus_head, focused) TAILQ_FOREACH_REVERSE(child, &(con->focus_head), focus_head, focused)
x_raise_con(child); x_raise_con(child);
DLOG("done\n");
if ((child = TAILQ_FIRST(&(con->focus_head)))) { if ((child = TAILQ_FIRST(&(con->focus_head)))) {
DLOG("con %p is stacking, raising %p\n", con, child);
/* By rendering the stacked container again, we handle the case /* By rendering the stacked container again, we handle the case
* that we have a non-leaf-container inside the stack. In that * that we have a non-leaf-container inside the stack. In that
* case, the children of the non-leaf-container need to be raised * case, the children of the non-leaf-container need to be raised
@ -362,11 +342,8 @@ void render_con(Con *con, bool render_fullscreen) {
Con *child; Con *child;
TAILQ_FOREACH(child, &(con->floating_head), floating_windows) { TAILQ_FOREACH(child, &(con->floating_head), floating_windows) {
DLOG("render floating:\n");
DLOG("floating child at (%d,%d) with %d x %d\n", child->rect.x, child->rect.y, child->rect.width, child->rect.height); DLOG("floating child at (%d,%d) with %d x %d\n", child->rect.x, child->rect.y, child->rect.width, child->rect.height);
x_raise_con(child); x_raise_con(child);
render_con(child, false); render_con(child, false);
} }
DLOG("-- level up\n");
} }

View File

@ -16,7 +16,7 @@
*/ */
void window_update_class(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt) { void window_update_class(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt) {
if (prop == NULL || xcb_get_property_value_length(prop) == 0) { if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
DLOG("empty property, not updating\n"); DLOG("WM_CLASS not set.\n");
FREE(prop); FREE(prop);
return; return;
} }
@ -105,7 +105,7 @@ void window_update_name(i3Window *win, xcb_get_property_reply_t *prop, bool befo
*/ */
void window_update_name_legacy(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt) { void window_update_name_legacy(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt) {
if (prop == NULL || xcb_get_property_value_length(prop) == 0) { if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
DLOG("prop == NULL\n"); DLOG("WM_NAME not set (_NET_WM_NAME is what you want anyways).\n");
FREE(prop); FREE(prop);
return; return;
} }
@ -152,7 +152,7 @@ void window_update_name_legacy(i3Window *win, xcb_get_property_reply_t *prop, bo
*/ */
void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop) { void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop) {
if (prop == NULL || xcb_get_property_value_length(prop) == 0) { if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
DLOG("prop == NULL\n"); DLOG("CLIENT_LEADER not set.\n");
FREE(prop); FREE(prop);
return; return;
} }
@ -176,7 +176,7 @@ void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop) {
*/ */
void window_update_transient_for(i3Window *win, xcb_get_property_reply_t *prop) { void window_update_transient_for(i3Window *win, xcb_get_property_reply_t *prop) {
if (prop == NULL || xcb_get_property_value_length(prop) == 0) { if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
DLOG("prop == NULL\n"); DLOG("TRANSIENT_FOR not set.\n");
FREE(prop); FREE(prop);
return; return;
} }
@ -200,7 +200,7 @@ void window_update_transient_for(i3Window *win, xcb_get_property_reply_t *prop)
*/ */
void window_update_strut_partial(i3Window *win, xcb_get_property_reply_t *prop) { void window_update_strut_partial(i3Window *win, xcb_get_property_reply_t *prop) {
if (prop == NULL || xcb_get_property_value_length(prop) == 0) { if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
DLOG("prop == NULL\n"); DLOG("_NET_WM_STRUT_PARTIAL not set.\n");
FREE(prop); FREE(prop);
return; return;
} }
@ -225,7 +225,7 @@ void window_update_strut_partial(i3Window *win, xcb_get_property_reply_t *prop)
*/ */
void window_update_role(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt) { void window_update_role(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt) {
if (prop == NULL || xcb_get_property_value_length(prop) == 0) { if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
DLOG("prop == NULL\n"); DLOG("WM_WINDOW_ROLE not set.\n");
FREE(prop); FREE(prop);
return; return;
} }

34
src/x.c
View File

@ -274,21 +274,16 @@ void x_draw_decoration(Con *con) {
parent->layout != L_TABBED) || parent->layout != L_TABBED) ||
con->type == CT_FLOATING_CON) con->type == CT_FLOATING_CON)
return; return;
DLOG("decoration should be rendered for con %p\n", con);
/* Skip containers whose height is 0 (for example empty dockareas) */ /* Skip containers whose height is 0 (for example empty dockareas) */
if (con->rect.height == 0) { if (con->rect.height == 0)
DLOG("height == 0, not rendering\n");
return; return;
}
/* Skip containers whose pixmap has not yet been created (can happen when /* Skip containers whose pixmap has not yet been created (can happen when
* decoration rendering happens recursively for a window for which * decoration rendering happens recursively for a window for which
* x_push_node() was not yet called) */ * x_push_node() was not yet called) */
if (leaf && con->pixmap == XCB_NONE) { if (leaf && con->pixmap == XCB_NONE)
DLOG("pixmap not yet created, not rendering\n");
return; return;
}
/* 1: build deco_params and compare with cache */ /* 1: build deco_params and compare with cache */
struct deco_render_params *p = scalloc(sizeof(struct deco_render_params)); struct deco_render_params *p = scalloc(sizeof(struct deco_render_params));
@ -319,15 +314,12 @@ void x_draw_decoration(Con *con) {
!parent->pixmap_recreated && !parent->pixmap_recreated &&
!con->pixmap_recreated && !con->pixmap_recreated &&
memcmp(p, con->deco_render_params, sizeof(struct deco_render_params)) == 0) { memcmp(p, con->deco_render_params, sizeof(struct deco_render_params)) == 0) {
DLOG("CACHE HIT, copying existing pixmaps\n");
free(p); free(p);
goto copy_pixmaps; goto copy_pixmaps;
} }
DLOG("CACHE MISS\n");
Con *next = con; Con *next = con;
while ((next = TAILQ_NEXT(next, nodes))) { while ((next = TAILQ_NEXT(next, nodes))) {
DLOG("Also invalidating cache of %p\n", next);
FREE(next->deco_render_params); FREE(next->deco_render_params);
} }
@ -395,10 +387,8 @@ void x_draw_decoration(Con *con) {
/* if this is a borderless/1pixel window, we dont * need to render the /* if this is a borderless/1pixel window, we dont * need to render the
* decoration. */ * decoration. */
if (p->border_style != BS_NORMAL) { if (p->border_style != BS_NORMAL)
DLOG("border style not BS_NORMAL, aborting rendering of decoration\n");
goto copy_pixmaps; goto copy_pixmaps;
}
/* 4: paint the bar */ /* 4: paint the bar */
xcb_change_gc_single(conn, parent->pm_gc, XCB_GC_FOREGROUND, p->color->background); xcb_change_gc_single(conn, parent->pm_gc, XCB_GC_FOREGROUND, p->color->background);
@ -445,7 +435,7 @@ void x_draw_decoration(Con *con) {
Con *il_parent = parent; Con *il_parent = parent;
if (il_parent->layout != L_STACKED) { if (il_parent->layout != L_STACKED) {
while (1) { while (1) {
DLOG("il_parent = %p, layout = %d\n", il_parent, il_parent->layout); //DLOG("il_parent = %p, layout = %d\n", il_parent, il_parent->layout);
if (il_parent->layout == L_STACKED) if (il_parent->layout == L_STACKED)
indent_level++; indent_level++;
if (il_parent->type == CT_WORKSPACE || il_parent->type == CT_DOCKAREA || il_parent->type == CT_OUTPUT) if (il_parent->type == CT_WORKSPACE || il_parent->type == CT_DOCKAREA || il_parent->type == CT_OUTPUT)
@ -454,7 +444,7 @@ void x_draw_decoration(Con *con) {
indent_mult++; indent_mult++;
} }
} }
DLOG("indent_level = %d, indent_mult = %d\n", indent_level, indent_mult); //DLOG("indent_level = %d, indent_mult = %d\n", indent_level, indent_mult);
int indent_px = (indent_level * 5) * indent_mult; int indent_px = (indent_level * 5) * indent_mult;
if (win->uses_net_wm_name) if (win->uses_net_wm_name)
@ -544,10 +534,8 @@ void x_push_node(Con *con) {
} }
} }
rect.height = max_y + max_height; rect.height = max_y + max_height;
if (rect.height == 0) { if (rect.height == 0)
DLOG("Unmapping container %p because it does not contain anything.\n", con);
con->mapped = false; con->mapped = false;
}
} }
/* reparent the child window (when the window was moved due to a sticky /* reparent the child window (when the window was moved due to a sticky
@ -591,9 +579,6 @@ void x_push_node(Con *con) {
* (height == 0). */ * (height == 0). */
if ((state->rect.width != rect.width || if ((state->rect.width != rect.width ||
state->rect.height != rect.height)) { state->rect.height != rect.height)) {
DLOG("CACHE: creating new pixmap for con %p (old: %d x %d, new: %d x %d)\n",
con, state->rect.width, state->rect.height,
rect.width, rect.height);
if (con->pixmap == 0) { if (con->pixmap == 0) {
con->pixmap = xcb_generate_id(conn); con->pixmap = xcb_generate_id(conn);
con->pm_gc = xcb_generate_id(conn); con->pm_gc = xcb_generate_id(conn);
@ -809,7 +794,7 @@ void x_push_changes(Con *con) {
order_changed = true; order_changed = true;
if ((state->initial || order_changed) && prev != CIRCLEQ_END(&state_head)) { if ((state->initial || order_changed) && prev != CIRCLEQ_END(&state_head)) {
stacking_changed = true; stacking_changed = true;
DLOG("Stacking 0x%08x above 0x%08x\n", prev->id, state->id); //DLOG("Stacking 0x%08x above 0x%08x\n", prev->id, state->id);
uint32_t mask = 0; uint32_t mask = 0;
mask |= XCB_CONFIG_WINDOW_SIBLING; mask |= XCB_CONFIG_WINDOW_SIBLING;
mask |= XCB_CONFIG_WINDOW_STACK_MODE; mask |= XCB_CONFIG_WINDOW_STACK_MODE;
@ -825,7 +810,7 @@ void x_push_changes(Con *con) {
if (stacking_changed) if (stacking_changed)
ewmh_update_client_list_stacking(btt_stack, btt_stack_num); ewmh_update_client_list_stacking(btt_stack, btt_stack_num);
DLOG("\n\n PUSHING CHANGES\n\n"); DLOG("PUSHING CHANGES\n");
x_push_node(con); x_push_node(con);
//DLOG("Re-enabling EnterNotify\n"); //DLOG("Re-enabling EnterNotify\n");
@ -842,7 +827,6 @@ void x_push_changes(Con *con) {
if (focused->window != NULL) if (focused->window != NULL)
to_focus = focused->window->id; to_focus = focused->window->id;
DLOG("focused_id = 0x%08x, to_focus = 0x%08x\n", focused_id, to_focus);
if (focused_id != to_focus) { if (focused_id != to_focus) {
if (!focused->mapped) { if (!focused->mapped) {
DLOG("Not updating focus (to %p / %s), focused window is not mapped.\n", focused, focused->name); DLOG("Not updating focus (to %p / %s), focused window is not mapped.\n", focused, focused->name);
@ -896,7 +880,7 @@ void x_push_changes(Con *con) {
} }
xcb_flush(conn); xcb_flush(conn);
DLOG("\n\n ENDING CHANGES\n\n"); DLOG("ENDING CHANGES\n");
/* Disable EnterWindow events for windows which will be unmapped in /* Disable EnterWindow events for windows which will be unmapped in
* x_push_node_unmaps() now. Unmapping windows happens when switching * x_push_node_unmaps() now. Unmapping windows happens when switching