]> git.sur5r.net Git - i3/i3/blobdiff - src/manage.c
Merge branch 'master' into next
[i3/i3] / src / manage.c
index f768ccb54a0a6a1906abda6c7f032cf29677c534..ff7fdc6d09bae81c641cbc66162667995f00ec91 100644 (file)
@@ -406,6 +406,10 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
     /* Check if any assignments match */
     run_assignments(cwindow);
 
+    /* 'ws' may be invalid because of the assignments, e.g. when the user uses
+     * "move window to workspace 1", but had it assigned to workspace 2. */
+    ws = con_get_workspace(nc);
+
     /* If this window was put onto an invisible workspace (via assignments), we
      * render this workspace. It wouldn’t be rendered in our normal code path
      * because only the visible workspaces get rendered.