diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-06-27 09:05:46 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-06-27 09:05:46 +0200 |
| commit | f5879ae2283404e48aeca218f896b746eb973468 (patch) | |
| tree | c7df709037cff16f2a32e6ad83656786008d4c8f /src | |
| parent | 81615bbe0b96dc8640cee453b86bf8b4363b175a (diff) | |
Slight simplification of Fl_Wayland_Gl_Window_Driver::swap_buffers()
Also, reorder members of class Fl_Wayland_Gl_Window_Driver
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H | 9 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 6 |
2 files changed, 6 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 64248bfdb..5506ad5eb 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H @@ -35,6 +35,11 @@ Consequently, FL_DOUBLE is enforced in all Fl_Gl_Window::mode_ values under Wayl class Fl_Wayland_Gl_Window_Driver : public Fl_Gl_Window_Driver { friend Fl_Gl_Window_Driver* Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *); friend class Fl_Wayland_Gl_Plugin; +private: + static EGLDisplay egl_display; + static EGLint configs_count; + struct wl_egl_window *egl_window; + EGLSurface egl_surface; bool egl_swap_in_progress; Fl_Wayland_Gl_Window_Driver(Fl_Gl_Window *win); float pixels_per_unit() FL_OVERRIDE; @@ -52,11 +57,7 @@ class Fl_Wayland_Gl_Window_Driver : public Fl_Gl_Window_Driver { void gl_start() FL_OVERRIDE; void gl_visual(Fl_Gl_Choice *c) FL_OVERRIDE; char *alpha_mask_for_string(const char *str, int n, int w, int h, Fl_Fontsize fs) FL_OVERRIDE; - static EGLDisplay egl_display; - static EGLint configs_count; void init(); - struct wl_egl_window *egl_window; - EGLSurface egl_surface; public: //virtual bool need_scissor() { return true; } // CONTROL_LEAKING_SUB_GL_WINDOWS //void apply_scissor(); // CONTROL_LEAKING_SUB_GL_WINDOWS diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 9ff150461..83912582b 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -358,11 +358,7 @@ void Fl_Wayland_Gl_Window_Driver::swap_buffers() { if (egl_surface && !egl_swap_in_progress) { egl_swap_in_progress = true; // prevents crash while down resizing rotating glpuzzle - while (wl_display_prepare_read(Fl_Wayland_Screen_Driver::wl_display) != 0) { - wl_display_dispatch_pending(Fl_Wayland_Screen_Driver::wl_display); - } - 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; } |
