mirror of
https://github.com/fltk/fltk.git
synced 2026-05-09 21:06:51 +08:00
Wayland: use libdecor_dispatch() instead of wl_display_dispatch().
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user