diff options
author | Manuel Stoeckl <code@mstoeckl.com> | 2022-09-10 16:57:04 -0400 |
---|---|---|
committer | Manuel Stoeckl <code@mstoeckl.com> | 2022-09-10 16:58:53 -0400 |
commit | 232b4fd9217e13fd1ba4ad4229b2d4ec63d087d7 (patch) | |
tree | bcaa933b8a7116499dd2a0ad41f6a5496a79c385 | |
parent | 0475df808f302c11c2d69ad1bd32fd2acb9cf2cf (diff) |
Resize output->egl_window on re-configure
-rw-r--r-- | src/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -133,6 +133,8 @@ static void render(struct display_output *output) { if (!eglMakeCurrent(egl_display, output->egl_surface, output->egl_surface, egl_context)) { cflp_error("Failed to make output surface current 0x%X", eglGetError()); } + glViewport(0, 0, output->width * output->scale, output->height * output->scale); + // Render frame mpv_render_context_render(mpv_glcontext, render_params); @@ -656,10 +658,11 @@ static void layer_surface_configure(void *data, struct zwlr_layer_surface_v1 *su eglSwapInterval(egl_display, 0); glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glViewport(0, 0, output->width * output->scale, output->height * output->scale); // Start render loop render(output); + } else { + wl_egl_window_resize(output->egl_window, output->width * output->scale, output->height * output->scale, 0, 0); } } |