aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2021-01-09 16:15:10 +0000
committerHarry Jeffery <harry@exec64.co.uk>2021-01-09 16:15:10 +0000
commit1b85ba53b0a8b44bb4330d7c86cefcf5ff1e0ab1 (patch)
treec8005e71e9681c2ba675c72d4db3c401a15289b6 /src
parenta4bb341a9bbbed3e6af2400f2a0b794d293bde68 (diff)
downloadimv-1b85ba53b0a8b44bb4330d7c86cefcf5ff1e0ab1.tar.gz
Wayland: Perform display roundtrip after changing scale
Fixes #305
Diffstat (limited to 'src')
-rw-r--r--src/wl_window.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wl_window.c b/src/wl_window.c
index d79f1bb..e691d76 100644
--- a/src/wl_window.c
+++ b/src/wl_window.c
@@ -543,6 +543,7 @@ static void update_scale(struct imv_window *window)
window->scale = new_scale;
wl_surface_set_buffer_scale(window->wl_surface, window->scale);
wl_surface_commit(window->wl_surface);
+ wl_display_roundtrip(window->wl_display);
size_t buffer_width = window->width * window->scale;
size_t buffer_height = window->height * window->scale;
wl_egl_window_resize(window->egl_window, buffer_width, buffer_height, 0, 0);
@@ -634,8 +635,8 @@ static void toplevel_configure(void *data, struct xdg_toplevel *toplevel,
.resize = {
.width = window->width,
.height = window->height,
- .buffer_width = window->width * window->scale,
- .buffer_height = window->height * window->scale
+ .buffer_width = buffer_width,
+ .buffer_height = buffer_height,
}
}
};