~ruther/dwl

a10357fae06dded1818d4b12105680f9a08803fb — Devin J. Pohly 4 years ago a21c937
condense appid/title logic
1 files changed, 8 insertions(+), 11 deletions(-)

M dwl.c
M dwl.c => dwl.c +8 -11
@@ 281,17 281,14 @@ applyrules(Client *c)

	/* rule matching */
	c->isfloating = 0;
	if (c->isxdg) {
		if (!(appid = c->xdg_surface->toplevel->app_id))
			appid = broken;
		if (!(title = c->xdg_surface->toplevel->title))
			title = broken;
	} else {
		if (!(appid = c->xwayland_surface->class))
			appid = broken;
		if (!(title = c->xwayland_surface->title))
			title = broken;
	}
	appid = c->isxdg ? c->xdg_surface->toplevel->app_id :
		c->xwayland_surface->class;
	title = c->isxdg ? c->xdg_surface->toplevel->title :
		c->xwayland_surface->title;
	if (!appid)
		appid = broken;
	if (!title)
		title = broken;

	for (r = rules; r < END(rules); r++) {
		if ((!r->title || strstr(title, r->title))

Do not follow this link