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:
@@ -3163,6 +3163,7 @@ static void setmon(Client *c, Monitor *m, uint32_t newtags) {
|
|||||||
return;
|
return;
|
||||||
c->mon = m;
|
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)
|
if (oldmon)
|
||||||
@@ -3311,6 +3312,20 @@ reapply_monitor_config(void)
|
|||||||
wlr_output_state_set_transform(&state, r->transform);
|
wlr_output_state_set_transform(&state, r->transform);
|
||||||
wlr_output_commit_state(m->wlr_output, &state);
|
wlr_output_commit_state(m->wlr_output, &state);
|
||||||
wlr_output_state_finish(&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 */
|
/* Update position */
|
||||||
if (r->x != -1 && r->y != -1)
|
if (r->x != -1 && r->y != -1)
|
||||||
wlr_output_layout_add(output_layout, m->wlr_output, r->x, r->y);
|
wlr_output_layout_add(output_layout, m->wlr_output, r->x, r->y);
|
||||||
|
|||||||
Reference in New Issue
Block a user