diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-20 10:15:07 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2023-02-20 12:11:07 +0100 |
commit | 7a6c7d60d5dece586654d8855f34da25e92987fa (patch) | |
tree | a897af608f5016b311b2c49f397f5062ed5c4a32 /sway/desktop/output.c | |
parent | 633d409b8897aec48ad1e328cb04261faa2b1a0b (diff) |
Update surface fractional scale on output change
Closes: https://github.com/swaywm/sway/issues/7464
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 141edb49..302f9fda 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -859,6 +859,12 @@ static void update_textures(struct sway_container *con, void *data) { container_update_marks_textures(con); } +static void update_output_scale_iterator(struct sway_output *output, + struct sway_view *view, struct wlr_surface *surface, + struct wlr_box *box, void *user_data) { + surface_update_outputs(surface); +} + static void handle_commit(struct wl_listener *listener, void *data) { struct sway_output *output = wl_container_of(listener, output, commit); struct wlr_output_event_commit *event = data; @@ -873,6 +879,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { if (event->committed & WLR_OUTPUT_STATE_SCALE) { output_for_each_container(output, update_textures, NULL); + output_for_each_surface(output, update_output_scale_iterator, NULL); } if (event->committed & (WLR_OUTPUT_STATE_TRANSFORM | WLR_OUTPUT_STATE_SCALE)) { |