Merge branch 'master' into next

Conflicts:
	src/handlers.c
This commit is contained in:
Michael Stapelberg
2012-01-18 19:18:22 +00:00
6 changed files with 58 additions and 15 deletions

View File

@ -819,18 +819,16 @@ static bool handle_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_
xcb_icccm_wm_hints_t hints;
if (reply != NULL) {
if (!xcb_icccm_get_wm_hints_from_reply(&hints, reply))
if (reply == NULL)
if (!(reply = xcb_get_property_reply(conn, xcb_icccm_get_wm_hints(conn, window), NULL)))
return false;
} else {
if (!xcb_icccm_get_wm_hints_reply(conn, xcb_icccm_get_wm_hints_unchecked(conn, con->window->id), &hints, NULL))
return false;
}
if (!xcb_icccm_get_wm_hints_from_reply(&hints, reply))
return false;
if (!con->urgent && focused == con) {
DLOG("Ignoring urgency flag for current client\n");
FREE(reply);
return true;
goto end;
}
/* Update the flag on the client directly */
@ -846,7 +844,10 @@ static bool handle_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_
tree_render();
FREE(reply);
end:
if (con->window)
window_update_hints(con->window, reply);
else free(reply);
return true;
}