Skip to content

Commit

Permalink
try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Aug 18, 2024
1 parent 04bf838 commit 9673df7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/cfl_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
#include <FL/platform.H>

#if defined(FLTK_USE_WAYLAND)
extern "C" void wl_proxy_marshal(void *proxy, unsigned opcode, ...);
#elif defined(FLTK_USE_X11)
// extern "C" void XUnmapWindow(void *display, unsigned long win);
// extern "C" void XMapWindow(void *display, unsigned long win);
#else
#include <wayland-client.h>
#endif

extern "C" void cfltk_platform_hide(void *proxy) {
#if defined(FLTK_USE_WAYLAND)
#if defined(FLTK_USE_WAYLAND) && defined(FLTK_USE_X11)
if (FLTK_USE_WAYLAND == 1 && fl_wl_display()) {
wl_proxy_marshal(proxy, 1, 0, 0, 0);
wl_proxy_marshal(proxy, 6);
wl_surface_attach((struct wl_surface *)proxy, NULL, 0, 0);
wl_surface_commit((struct wl_surface *)proxy);
} 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);
}
#elif defined(FLTK_USE_X11)
if (FLTK_USE_X11 == 1 && fl_x11_display()) {
Expand Down

0 comments on commit 9673df7

Please sign in to comment.