Properly handle windows unsetting WM_TRANSIENT_FOR (Thanks Janus)

fixes #1351
This commit is contained in:
Michael Stapelberg
2014-08-26 10:00:14 +02:00
parent 9058fc44e6
commit 2fecf57699
4 changed files with 33 additions and 3 deletions

View File

@ -125,7 +125,8 @@ 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) {
if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
DLOG("CLIENT_LEADER not set.\n");
DLOG("CLIENT_LEADER not set on window 0x%08x.\n", win->id);
win->leader = XCB_NONE;
FREE(prop);
return;
}
@ -149,7 +150,8 @@ 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) {
if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
DLOG("TRANSIENT_FOR not set.\n");
DLOG("TRANSIENT_FOR not set on window 0x%08x.\n", win->id);
win->transient_for = XCB_NONE;
FREE(prop);
return;
}
@ -160,7 +162,7 @@ void window_update_transient_for(i3Window *win, xcb_get_property_reply_t *prop)
return;
}
DLOG("Transient for changed to %08x\n", transient_for);
DLOG("Transient for changed to 0x%08x (window 0x%08x)\n", transient_for, win->id);
win->transient_for = transient_for;