Skip to content

Commit

Permalink
use extern C decl
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Aug 19, 2024
1 parent 9673df7 commit 95219c6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cfl_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
#include <FL/platform.H>

#if defined(FLTK_USE_WAYLAND)
#include <wayland-client.h>
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()) {
Expand Down

0 comments on commit 95219c6

Please sign in to comment.