Properly handle windows unsetting WM_TRANSIENT_FOR (Thanks Janus)
fixes #1351
This commit is contained in:
@ -339,6 +339,11 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
|
||||
ystr(i3string_as_utf8(con->window->name));
|
||||
}
|
||||
|
||||
ystr("transient_for");
|
||||
if (con->window->transient_for == XCB_NONE)
|
||||
y(null);
|
||||
else y(integer, con->window->transient_for);
|
||||
|
||||
y(map_close);
|
||||
}
|
||||
|
||||
|
@ -288,6 +288,8 @@ void render_con(Con *con, bool render_fullscreen) {
|
||||
while (transient_con != NULL &&
|
||||
transient_con->window != NULL &&
|
||||
transient_con->window->transient_for != XCB_NONE) {
|
||||
DLOG("transient_con = 0x%08x, transient_con->window->transient_for = 0x%08x, fullscreen_id = 0x%08x\n",
|
||||
transient_con->window->id, transient_con->window->transient_for, fullscreen->window->id);
|
||||
if (transient_con->window->transient_for == fullscreen->window->id) {
|
||||
is_transient_for = true;
|
||||
break;
|
||||
|
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user