output: update xcursor configuration on scale change

Sway will not correctly update the cursor glyph cache on an output
scale change. This results in sway falling back to a lower resolution
cursor glyph or just not rendering the correct cursor at all.

This is reproducible simply by using `swaymsg` to change
the scale sometimes, but I found 100% reproducibility when using
these patches[1].

[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3418
This commit is contained in:
Alexander Orzechowski 2022-02-19 14:14:14 -05:00
parent f707f583e1
commit 99323726db

View file

@ -824,6 +824,13 @@ static void handle_commit(struct wl_listener *listener, void *data) {
transaction_commit_dirty(); transaction_commit_dirty();
update_output_manager_config(output->server); update_output_manager_config(output->server);
if (event->committed & WLR_OUTPUT_STATE_SCALE) {
struct sway_seat *seat;
wl_list_for_each(seat, &server.input->seats, link) {
seat_configure_xcursor(seat);
}
}
} }
} }