Wayland: use libdecor_dispatch() instead of wl_display_dispatch().
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled

This commit is contained in:
ManoloFLTK
2026-04-09 19:11:45 +02:00
parent dfc930d346
commit 1ad5777c6a
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -612,6 +612,7 @@ if(FLTK_USE_WAYLAND)
endif(USE_SYSTEM_LIBDECOR)
set_source_files_properties(
${FLTK_SOURCE_DIR}/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
${FLTK_SOURCE_DIR}/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
${FLTK_SOURCE_DIR}/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
PROPERTIES COMPILE_DEFINITIONS "USE_SYSTEM_LIBDECOR=${USE_SYSTEM_LIBDECOR}"
)
@@ -19,6 +19,7 @@
#include <FL/platform.H>
#include <FL/Fl_Image_Surface.H>
#include "../../Fl_Gl_Choice.H"
#include "../../../libdecor/build/fl_libdecor.h"
#include "Fl_Wayland_Window_Driver.H"
#include "Fl_Wayland_Graphics_Driver.H"
#include "Fl_Wayland_Gl_Window_Driver.H"
@@ -273,7 +274,8 @@ void Fl_Wayland_Gl_Window_Driver::make_current_before() {
struct wl_surface *surface = win->wl_surface;
if (pWindow->parent()) { // force toplevel win to enter its display before sizing GL subwin
win = fl_wl_xid(pWindow->top_window());
while (wl_list_empty(&win->outputs)) wl_display_dispatch(fl_wl_display());
struct libdecor *ld = ((Fl_Wayland_Screen_Driver*)Fl::screen_driver())->libdecor_context;
while (wl_list_empty(&win->outputs)) libdecor_dispatch(ld, 0);
}
int W = pWindow->pixel_w();
int H = pWindow->pixel_h();