Implement support for WM_CLIENT_LEADER

This commit is contained in:
Michael Stapelberg
2010-11-12 23:46:03 +01:00
parent 1bb6906c56
commit ad9be5402a
8 changed files with 59 additions and 26 deletions

View File

@ -96,3 +96,22 @@ void window_update_name_legacy(i3Window *win, xcb_get_property_reply_t *prop) {
win->name_json = strdup(new_name);
win->name_len = strlen(new_name);
}
/**
* Updates the CLIENT_LEADER (logical parent window).
*
*/
void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop) {
if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
DLOG("prop == NULL\n");
return;
}
xcb_window_t *leader = xcb_get_property_value(prop);
if (leader == NULL)
return;
DLOG("Client leader changed to %08x\n", *leader);
win->leader = *leader;
}