implement support for WM_TRANSIENT_FOR, expand testcase

This commit is contained in:
Michael Stapelberg
2010-11-13 01:19:21 +01:00
parent ad9be5402a
commit 432073dbe5
8 changed files with 153 additions and 33 deletions

View File

@ -115,3 +115,22 @@ void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop) {
win->leader = *leader;
}
/**
* Updates the TRANSIENT_FOR (logical parent window).
*
*/
void window_update_transient_for(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 transient_for;
if (!xcb_get_wm_transient_for_from_reply(&transient_for, prop))
return;
DLOG("Transient for changed to %08x\n", transient_for);
win->transient_for = transient_for;
}