+ } else if (cwindow->wm_desktop != NET_WM_DESKTOP_NONE &&
+ cwindow->wm_desktop != NET_WM_DESKTOP_ALL &&
+ (wm_desktop_ws = ewmh_get_workspace_by_index(cwindow->wm_desktop)) != NULL) {
+ /* If _NET_WM_DESKTOP is set to a specific desktop, we open it
+ * there. Note that we ignore the special value 0xFFFFFFFF here
+ * since such a window will be made sticky anyway. */
+
+ DLOG("Using workspace %p / %s because _NET_WM_DESKTOP = %d.\n",
+ wm_desktop_ws, wm_desktop_ws->name, cwindow->wm_desktop);
+
+ nc = con_descend_tiling_focused(wm_desktop_ws);
+ if (nc->type == CT_WORKSPACE)
+ nc = tree_open_con(nc, cwindow);
+ else
+ nc = tree_open_con(nc->parent, cwindow);