~ruther/dwl

5af3c4169f1cfd93b4363a3276f978d7b7112b18 — Rutherther 1 year, 2 months ago 67e48dd + a5f2587
Merge branch 'main' into v0.6-a/patched-base
1 files changed, 24 insertions(+), 0 deletions(-)

M dwl.c
M dwl.c => dwl.c +24 -0
@@ 933,6 933,10 @@ closemon(Monitor *m)
		do /* don't switch to disabled mons */
			selmon = wl_container_of(mons.next, selmon, link);
		while (!selmon->wlr_output->enabled && i++ < nmons);

		if (!selmon->wlr_output->enabled) {
			selmon = NULL;
		}
	}

	wl_list_for_each(c, &clients, link) {


@@ 1110,6 1114,7 @@ createmon(struct wl_listener *listener, void *data)
	 * monitor) becomes available. */
	struct wlr_output *wlr_output = data;
	const MonitorRule *r;
	Client *c;
	size_t i;
	struct wlr_output_state state;
	Monitor *m;


@@ 1178,10 1183,25 @@ createmon(struct wl_listener *listener, void *data)
	 * output (such as DPI, scale factor, manufacturer, etc).
	 */
	m->scene_output = wlr_scene_output_create(scene, wlr_output);

	if (m->m.x < 0 || m->m.y < 0)
		wlr_output_layout_add_auto(output_layout, wlr_output);
	else
		wlr_output_layout_add(output_layout, wlr_output, m->m.x, m->m.y);

	/* Recovering from state with no monitors
	 * Add all clients to the only monitor.
	 */
	if (selmon == NULL) {
		selmon = m;

		wl_list_for_each(c, &clients, link) {
			if (c->isfloating && c->geom.x > m->m.width)
				resize(c, (struct wlr_box){.x = c->geom.x - m->w.width, .y = c->geom.y,
						.width = c->geom.width, .height = c->geom.height}, 0);
			setmon(c, selmon, c->tags);
		}
	}
}

void


@@ 3589,6 3609,10 @@ updatemons(struct wl_listener *listener, void *data)

		config_head->state.x = m->m.x;
		config_head->state.y = m->m.y;

		if (!selmon) {
			selmon = m;
		}
	}

	if (selmon && selmon->wlr_output->enabled) {

Do not follow this link