~ruther/dwl

20a19849479d1b69a38a405e68f3a1010b3f8f43 — Rutherther 8 months ago e8f632a v0.7/singletagset-pertag-ipc-compat
Fix to work with pertag

Fix seltags, focusclient after selmon changed
1 files changed, 13 insertions(+), 12 deletions(-)

M dwl.c
M dwl.c => dwl.c +13 -12
@@ 1607,15 1607,14 @@ dwl_ipc_output_set_layout(struct wl_client *client, struct wl_resource *resource
	if (!ipc_output)
		return;

	monitor = ipc_output->mon;
	if (index >= LENGTH(layouts))
		return;
	if (index != monitor->lt[monitor->sellt] - layouts)
		monitor->sellt ^= 1;

	monitor->lt[monitor->sellt] = &layouts[index];
	arrange(monitor);
	printstatus();
	monitor = selmon;
	selmon = ipc_output->mon;
	setlayout(&(Arg){.v = &layouts[index]});
	selmon = monitor;
	focusclient(focustop(selmon), 1);
}

void


@@ 1632,13 1631,14 @@ dwl_ipc_output_set_tags(struct wl_client *client, struct wl_resource *resource, 

	if (!newtags || newtags == monitor->tagset[monitor->seltags])
		return;
	if (toggle_tagset)
		monitor->seltags ^= 1;
	/* if (!toggle_tagset) */
	/* 	monitor->seltags ^= 1; */

	monitor->tagset[monitor->seltags] = newtags;
	focusclient(focustop(monitor), 1);
	arrange(monitor);
	printstatus();
	monitor = selmon;
	selmon = ipc_output->mon;
	view(&(Arg){.ui = newtags});
	selmon = monitor;
	focusclient(focustop(selmon), 1);
}

void


@@ 3453,6 3453,7 @@ zoom(const Arg *arg)
}

#ifdef XWAYLAND

void
activatex11(struct wl_listener *listener, void *data)
{

Do not follow this link