aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-01-22 14:27:23 -0500
committeremersion <contact@emersion.fr>2019-01-22 21:19:34 +0100
commit88ee102992a4a866f46f055385918499a91ac587 (patch)
treea77ebaaec4d6a66f33fafe68f7fa7030dc8118d8 /backend
parent365a75139c382b3627ee96eade827038b1a2bc1a (diff)
backend/wayland: fix resizing
Before resizing the egl window, the buffers must be swapped
Diffstat (limited to 'backend')
-rw-r--r--backend/wayland/output.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index a515374b..1d0c39ef 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -43,8 +43,10 @@ static struct wl_callback_listener frame_listener = {
static bool output_set_custom_mode(struct wlr_output *wlr_output,
int32_t width, int32_t height, int32_t refresh) {
struct wlr_wl_output *output = get_wl_output_from_output(wlr_output);
+ wlr_egl_swap_buffers(&output->backend->egl, output->egl_surface, NULL);
wl_egl_window_resize(output->egl_window, width, height, 0, 0);
wlr_output_update_custom_mode(&output->wlr_output, width, height, 0);
+
return true;
}
@@ -253,8 +255,7 @@ static void xdg_toplevel_handle_configure(void *data,
return;
}
// loop over states for maximized etc?
- wl_egl_window_resize(output->egl_window, width, height, 0, 0);
- wlr_output_update_custom_mode(&output->wlr_output, width, height, 0);
+ output_set_custom_mode(&output->wlr_output, width, height, 0);
}
static void xdg_toplevel_handle_close(void *data,