Assigned windows open urgent when not visible
When i3 begins to manage a window, if the window opens on a workspace that is not visible, the urgency hint on the newly managed window will be set. fixes #1088
This commit is contained in:
committed by
Michael Stapelberg
parent
14b86acf40
commit
e99158e419
12
src/manage.c
12
src/manage.c
@ -279,11 +279,17 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
|
||||
if ((assignment = assignment_for(cwindow, A_TO_WORKSPACE | A_TO_OUTPUT))) {
|
||||
DLOG("Assignment matches (%p)\n", match);
|
||||
if (assignment->type == A_TO_WORKSPACE) {
|
||||
nc = con_descend_tiling_focused(workspace_get(assignment->dest.workspace, NULL));
|
||||
DLOG("focused on ws %s: %p / %s\n", assignment->dest.workspace, nc, nc->name);
|
||||
Con *assigned_ws = workspace_get(assignment->dest.workspace, NULL);
|
||||
nc = con_descend_tiling_focused(assigned_ws);
|
||||
DLOG("focused on ws %s: %p / %s\n", assigned_ws->name, nc, nc->name);
|
||||
if (nc->type == CT_WORKSPACE)
|
||||
nc = tree_open_con(nc, cwindow);
|
||||
else nc = tree_open_con(nc->parent, cwindow);
|
||||
else
|
||||
nc = tree_open_con(nc->parent, cwindow);
|
||||
|
||||
/* set the urgency hint on the window if the workspace is not visible */
|
||||
if (!workspace_is_visible(assigned_ws))
|
||||
urgency_hint = true;
|
||||
}
|
||||
/* TODO: handle assignments with type == A_TO_OUTPUT */
|
||||
} else if (startup_ws) {
|
||||
|
Reference in New Issue
Block a user