diff options
| -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; } |
