FLTK logo

[master] 48ca0e3 - Avoid glpuzzle crash when resizing while puzzle is spinning.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 48ca0e3 - Avoid glpuzzle crash when resizing while puzzle is spinning. "ManoloFLTK" May 09, 2022  
 
commit 48ca0e3b507f709041ad9a33b28b16801c9bf95e
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon May 9 14:07:02 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon May 9 14:07:02 2022 +0200

    Avoid glpuzzle crash when resizing while puzzle is spinning.

 src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
index fc9d12d..8165152 100644
--- src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
+++ 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);
   }
 }
 
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.