show empty workspaces
This commit is contained in:
parent
a5da4d54f3
commit
3dff3d8b13
@ -186,3 +186,9 @@ Con *workspace_encapsulate(Con *ws);
|
||||
*
|
||||
*/
|
||||
void workspace_move_to_output(Con *ws, Output *output);
|
||||
|
||||
/*
|
||||
* Create all workspaces specified in the config bindings.
|
||||
*
|
||||
*/
|
||||
void workspace_init(void);
|
||||
|
@ -1199,6 +1199,7 @@ int main(int argc, char *argv[]) {
|
||||
atexit(i3_exit);
|
||||
|
||||
sd_notify(1, "READY=1");
|
||||
workspace_init();
|
||||
ev_loop(main_loop, 0);
|
||||
|
||||
/* Free these heap allocations just to satisfy LeakSanitizer. */
|
||||
|
@ -514,8 +514,8 @@ void workspace_show(Con *workspace) {
|
||||
* client, which will clear the urgency flag too early. Also, there is no
|
||||
* way for con_focus() to know about when to clear urgency immediately and
|
||||
* when to defer it. */
|
||||
/*
|
||||
if (old && TAILQ_EMPTY(&(old->nodes_head)) && TAILQ_EMPTY(&(old->floating_head))) {
|
||||
/* check if this workspace is currently visible */
|
||||
if (!workspace_is_visible(old)) {
|
||||
LOG("Closing old workspace (%p / %s), it is empty\n", old, old->name);
|
||||
yajl_gen gen = ipc_marshal_workspace_event("empty", old, NULL);
|
||||
@ -528,7 +528,6 @@ void workspace_show(Con *workspace) {
|
||||
|
||||
y(free);
|
||||
|
||||
/* Avoid calling output_push_sticky_windows later with a freed container. */
|
||||
if (old == old_focus) {
|
||||
old_focus = NULL;
|
||||
}
|
||||
@ -536,6 +535,7 @@ void workspace_show(Con *workspace) {
|
||||
ewmh_update_desktop_properties();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
workspace->fullscreen_mode = CF_OUTPUT;
|
||||
LOG("focused now = %p / %s\n", focused, focused->name);
|
||||
@ -1073,3 +1073,19 @@ void workspace_move_to_output(Con *ws, Output *output) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void workspace_init(void)
|
||||
{
|
||||
int i = 0;
|
||||
char *c = binding_workspace_names[0];
|
||||
|
||||
|
||||
while (c != NULL) {
|
||||
DLOG("bwn: %s\n", c);
|
||||
workspace_get(c);
|
||||
i++;
|
||||
c = binding_workspace_names[i];
|
||||
}
|
||||
|
||||
//workspace_show_by_name(binding_workspace_names[0]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user