summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-05-09 14:07:02 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-05-09 14:07:02 +0200
commit48ca0e3b507f709041ad9a33b28b16801c9bf95e (patch)
treea7c41605283062e0a8bbec3fc0c97cb291423879 /src/drivers
parent20c50312fcd807fdee6c907a9a8af250f79d02b0 (diff)
Avoid glpuzzle crash when resizing while puzzle is spinning.
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
index fc9d12dcb..8165152b8 100644
--- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
@@ -307,8 +307,13 @@ void Fl_Wayland_Gl_Window_Driver::swap_buffers() {
wl_display_read_events(Fl_Wayland_Screen_Driver::wl_display);
wl_display_dispatch_queue_pending(Fl_Wayland_Screen_Driver::wl_display, gl_event_queue);
}
+ if (!egl_window) return;
+ int W = 0, H;
+ if (!pWindow->parent()) wl_egl_window_get_attached_size(egl_window, &W, &H);
+ if (!egl_resize_in_progress || W == 0) {
+ eglSwapBuffers(Fl_Wayland_Gl_Window_Driver::egl_display, egl_surface);
+ }
egl_resize_in_progress = false;
- eglSwapBuffers(Fl_Wayland_Gl_Window_Driver::egl_display, egl_surface);
}
}