diff --git a/src/cfl_platform.cpp b/src/cfl_platform.cpp index cf30acb..98e3d1e 100644 --- a/src/cfl_platform.cpp +++ b/src/cfl_platform.cpp @@ -2,21 +2,21 @@ #include #if defined(FLTK_USE_WAYLAND) -#include +extern "C" void wl_proxy_marshal(void *, unsigned int opcode, ...); #endif extern "C" void cfltk_platform_hide(void *proxy) { #if defined(FLTK_USE_WAYLAND) && defined(FLTK_USE_X11) if (FLTK_USE_WAYLAND == 1 && fl_wl_display()) { - wl_surface_attach((struct wl_surface *)proxy, NULL, 0, 0); - wl_surface_commit((struct wl_surface *)proxy); + wl_proxy_marshal(proxy, 1, NULL, 0, 0); + wl_proxy_marshal(proxy, 6); } else if (FLTK_USE_X11 == 1 && fl_x11_display()) { XUnmapWindow(fl_x11_display(), (unsigned long)proxy); } #elif defined(FLTK_USE_WAYLAND) if (FLTK_USE_WAYLAND == 1 && fl_wl_display()) { - wl_surface_attach((struct wl_surface *)proxy, NULL, 0, 0); - wl_surface_commit((struct wl_surface *)proxy); + wl_proxy_marshal(proxy, 1, NULL, 0, 0); + wl_proxy_marshal(proxy, 6); } #elif defined(FLTK_USE_X11) if (FLTK_USE_X11 == 1 && fl_x11_display()) {