diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-12-28 08:55:02 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-12-28 08:55:02 +0100 |
| commit | bb96cfac44a77f89541a86fd8751fe1a279bfba4 (patch) | |
| tree | 407ef5b86735946b98d877062c958c1f0eb29324 /src/drivers/Wayland | |
| parent | 86adfe0dbec66773202fbf207d5182ac9596d257 (diff) | |
Wayland: remove un-necessary Fl_Wayland_Gl_Window_Driver::gl_event_queue
Diffstat (limited to 'src/drivers/Wayland')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H | 1 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 13 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H index c00df25ff..e30143468 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H @@ -55,7 +55,6 @@ class Fl_Wayland_Gl_Window_Driver : public Fl_Gl_Window_Driver { char *alpha_mask_for_string(const char *str, int n, int w, int h, Fl_Fontsize fs); static EGLDisplay egl_display; static EGLint configs_count; - static struct wl_event_queue *gl_event_queue; void init(); struct wl_egl_window *egl_window; EGLSurface egl_surface; diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 86aeee8b7..a797c04c2 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -65,7 +65,6 @@ static EGLConfig wld_egl_conf = NULL; EGLDisplay Fl_Wayland_Gl_Window_Driver::egl_display = EGL_NO_DISPLAY; EGLint Fl_Wayland_Gl_Window_Driver::configs_count = 0; -struct wl_event_queue *Fl_Wayland_Gl_Window_Driver::gl_event_queue = NULL; Fl_Wayland_Gl_Window_Driver::Fl_Wayland_Gl_Window_Driver(Fl_Gl_Window *win) : Fl_Gl_Window_Driver(win) { @@ -102,8 +101,6 @@ void Fl_Wayland_Gl_Window_Driver::init() { eglGetConfigs(egl_display, NULL, 0, &configs_count); //printf("EGL has %d configs\n", configs_count); eglBindAPI(EGL_OPENGL_API); - - gl_event_queue = wl_display_create_queue(fl_wl_display()); } @@ -360,12 +357,12 @@ void Fl_Wayland_Gl_Window_Driver::swap_buffers() { if (egl_surface && !egl_swap_in_progress) { egl_swap_in_progress = true; - //eglSwapInterval(egl_display, 0); // doesn't seem to have any effect in this context - while (wl_display_prepare_read(fl_wl_display()) != 0) { - wl_display_dispatch_pending(fl_wl_display()); + while (wl_display_prepare_read(Fl_Wayland_Screen_Driver::wl_display) != 0) { + wl_display_dispatch_pending(Fl_Wayland_Screen_Driver::wl_display); } - wl_display_read_events(fl_wl_display()); - wl_display_dispatch_queue_pending(fl_wl_display(), gl_event_queue); + wl_display_flush(Fl_Wayland_Screen_Driver::wl_display); + wl_display_read_events(Fl_Wayland_Screen_Driver::wl_display); + wl_display_dispatch_pending(Fl_Wayland_Screen_Driver::wl_display); eglSwapBuffers(Fl_Wayland_Gl_Window_Driver::egl_display, egl_surface); egl_swap_in_progress = false; } |
