From 325f75a2f1bf589fe77a6758dfbe87a6e4a4874b Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sun, 5 May 2024 13:25:40 +0200 Subject: [PATCH] ipc: fix to work with pertag --- dwl.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/dwl.c b/dwl.c index 129ef6a..13fc799 100644 --- a/dwl.c +++ b/dwl.c @@ -1406,15 +1406,13 @@ 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; } void @@ -1434,10 +1432,10 @@ dwl_ipc_output_set_tags(struct wl_client *client, struct wl_resource *resource, 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; } void -- 2.48.1