From 95219c66afd1ae0f8062a2756f51b1135f01e10a Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Mon, 19 Aug 2024 09:21:34 +0300 Subject: [PATCH] use extern C decl --- src/cfl_platform.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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()) {