Skip to content

Commit

Permalink
fix link error with Window::platform_hide
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Aug 18, 2024
1 parent fa5b0d6 commit 04bf838
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0)
set(CFLTK_PROJECT_VERSION 1.4.33)
set(CFLTK_PROJECT_VERSION 1.4.34)

project(
cfltk
Expand Down Expand Up @@ -69,12 +69,17 @@ set(CFLTK_SRCS
src/cfl_font.cpp
src/cfl_utils.cpp
src/cfl_prefs.cpp
src/Fl_Simple_Terminal.cxx)
src/Fl_Simple_Terminal.cxx
)

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CFLTK_SRCS ${CFLTK_SRCS} src/cfl_nswindow.m)
endif()

if(UNIX AND NOT APPLE)
set(CFLTK_SRCS ${CFLTK_SRCS} src/cfl_platform.cpp)
endif()

if(NOT ANDROID)
set(CFLTK_SRCS ${CFLTK_SRCS} src/cfl_printer.cpp)
endif()
Expand Down
2 changes: 1 addition & 1 deletion fltk
Submodule fltk updated 60 files
+4 −10 .gitignore
+3 −3 CMake/options.cmake
+35 −0 CMake/resources.cmake
+1 −1 CMake/variables.cmake
+16 −0 CMakeLists.txt
+7 −6 FL/Fl_Device.H
+1 −1 FL/Fl_Fill_Dial.H
+1 −1 FL/Fl_Gl_Window.H
+1 −1 FL/Fl_Help_View.H
+6 −2 FL/Fl_Tabs.H
+11 −5 FL/Fl_Terminal.H
+7 −0 FL/Fl_Text_Buffer.H
+4 −0 FL/Fl_Text_Display.H
+13 −0 FL/Fl_Widget.H
+12 −12 FL/Makefile.in
+5 −3 FL/fl_draw.H
+4 −4 Makefile
+4 −4 README.CMake.txt
+4 −0 README.Wayland.txt
+8 −8 configure.ac
+38 −38 documentation/Makefile
+31 −31 fltk-config.in
+23 −23 fltk-options/Makefile
+34 −1 fluid/Fl_Widget_Type.cxx
+24 −24 fluid/Makefile
+1 −0 fluid/README_fl.txt
+22 −12 fluid/widget_panel.cxx
+16 −11 fluid/widget_panel.fl
+1 −0 fluid/widget_panel.h
+17 −17 jpeg/Makefile
+15 −1 libdecor/build/fl_libdecor.c
+15 −15 png/Makefile
+6 −6 src/CMakeLists.txt
+1 −0 src/Fl_Choice.cxx
+19 −2 src/Fl_Input.cxx
+13 −1 src/Fl_Menu.cxx
+101 −41 src/Fl_Tabs.cxx
+30 −22 src/Fl_Terminal.cxx
+42 −0 src/Fl_Text_Buffer.cxx
+87 −17 src/Fl_Text_Display.cxx
+2 −2 src/Fl_Text_Editor.cxx
+1 −0 src/Fl_Widget.cxx
+1 −0 src/Fl_Window.cxx
+2 −0 src/Fl_XColor.H
+131 −131 src/Makefile
+17 −15 src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
+1 −1 src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+232 −89 src/fl_draw.cxx
+50 −17 src/fl_engraved_label.cxx
+3 −3 src/fl_labeltype.cxx
+18 −2 src/fl_overlay.cxx
+7 −1 src/makedepend
+1 −0 test/.gitignore
+29 −29 test/Makefile
+13 −14 test/handle_keys.cxx
+15 −2 test/label.cxx
+31 −0 test/makedepend
+208 −113 test/sudoku.cxx
+8 −2 test/tabs.fl
+11 −11 zlib/Makefile
2 changes: 1 addition & 1 deletion include/cfl_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ typedef void (*custom_draw_callback)(Fl_Widget *, void *);
return ret; \
} \
int widget##_take_focus(widget *self) { \
LOCK(auto ret = self->take_focus()); \
LOCK(auto ret = ((Fl_Widget *)self)->take_focus()); \
return ret; \
} \
void widget##_set_visible_focus(widget *self) { \
Expand Down
32 changes: 32 additions & 0 deletions src/cfl_platform.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <FL/Fl.H>
#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
#endif

extern "C" void cfltk_platform_hide(void *proxy) {
#if defined(FLTK_USE_WAYLAND)
if (FLTK_USE_WAYLAND == 1 && fl_wl_display()) {
wl_proxy_marshal(proxy, 1, 0, 0, 0);
wl_proxy_marshal(proxy, 6);
}
#elif defined(FLTK_USE_X11)
if (FLTK_USE_X11 == 1 && fl_x11_display()) {
XUnmapWindow(fl_x11_display(), (unsigned long)proxy);
}
#else
#endif
}

extern "C" void cfltk_platform_show(void *proxy) {
#if defined(FLTK_USE_X11)
if (FLTK_USE_X11 == 1 && fl_x11_display()) {
XMapWindow(fl_x11_display(), (unsigned long)proxy);
}
#endif
}

0 comments on commit 04bf838

Please sign in to comment.