g_assert(num < screen_num_desktops);
- if (old == num) return;
-
old = screen_desktop;
screen_desktop = num;
+
+ if (old == num) return;
+
PROP_SET32(RootWindow(ob_display, ob_screen),
net_current_desktop, cardinal, num);
}
}
- if (focus_client && (focus_client->desktop == DESKTOP_ALL ||
+ if (focus_client && ((client_normal(focus_client) &&
+ focus_client->desktop == DESKTOP_ALL) ||
focus_client->desktop == screen_desktop))
dofocus = FALSE;
it = g_slist_nth(config_desktops_names, i);
for (; i < screen_num_desktops; ++i) {
- if (it)
+ if (it && ((char*)it->data)[0]) /* not empty */
/* use the names from the config file when possible */
screen_desktop_names[i] = g_strdup(it->data);
else