fix(monitor): update surface scale on monitor migration and config reload

- Add client_update_scale() in setmon() after c->mon assignment

- Add client + layer surface scale iteration in reapply_monitor_config()

- Verify outputmgrapplyortest→updatemons propagation chain (no changes needed)
This commit is contained in:
2026-07-05 21:46:42 -04:00
parent 07d4db0c15
commit dac0b4fa6f
+17 -2
View File
@@ -3162,9 +3162,10 @@ static void setmon(Client *c, Monitor *m, uint32_t newtags) {
if (oldmon == m)
return;
c->mon = m;
c->prev = c->geom;
c->prev = c->geom;
client_update_scale(c);
/* Scene graph sends surface leave/enter events on move and resize */
/* Scene graph sends surface leave/enter events on move and resize */
if (oldmon)
arrange(oldmon);
if (m) {
@@ -3311,6 +3312,20 @@ reapply_monitor_config(void)
wlr_output_state_set_transform(&state, r->transform);
wlr_output_commit_state(m->wlr_output, &state);
wlr_output_state_finish(&state);
/* Re-notify surfaces on this monitor of new scale */
{
Client *c;
wl_list_for_each(c, &clients, link) {
if (c->mon == m)
client_update_scale(c);
}
for (int i = 0; i < 4; i++) {
LayerSurface *l;
wl_list_for_each(l, &m->layers[i], link) {
layersurface_update_scale(l);
}
}
}
/* Update position */
if (r->x != -1 && r->y != -1)
wlr_output_layout_add(output_layout, m->wlr_output, r->x, r->y);