Skip to content

Commit

Permalink
Wayland support
Browse files Browse the repository at this point in the history
  • Loading branch information
versionpatch authored and ddeclerck committed Mar 22, 2023
1 parent 381484b commit b932b68
Show file tree
Hide file tree
Showing 23 changed files with 4,306 additions and 42 deletions.
3 changes: 2 additions & 1 deletion src/configure.ml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ let () =
qtz_sw_context qtz_hw_context
x11_keysym x11_keyboard x11_backend x11_target x11_window
x11_sw_context x11_hw_context
wl_backend wl_target wl_window
wl_backend wl_memory wl_target wl_window
wl_sw_context wl_hw_context
wl_decoration wl_keyboard xdg-shell-protocol xdg-decor-protocol
window pixmap image_interpolation filters transform draw_instr
sw_context hw_context context
font_desc gdi_font qtz_font unx_font font
Expand Down
17 changes: 17 additions & 0 deletions src/discover/discover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ let wl_config c =
in
"-DHAS_WAYLAND" :: cflags, "-lrt" :: libs

let xdg_decoration_config _c =
[ "-DHAS_XDG_DECORATION" ], []

let fc_config c =
let cflags, libs =
query_or_default c "fontconfig"
Expand Down Expand Up @@ -120,6 +123,19 @@ int main()
}
|}

let xdg_decoration_test = {|
#include <wayland-client.h>
#include <wayland-cursor.h>
#define HAS_XDG_DECORATION
#include "../implem/wayland/xdg-decor-protocol.h"
#include "../implem/wayland/xdg-decor-protocol.c"
int main()
{
wl_display_connect(NULL);
return 0;
}
|}

let fc_test = {|
#include <fontconfig/fontconfig.h>
int main()
Expand Down Expand Up @@ -168,6 +184,7 @@ let () =
(qtz_config, qtz_test);
(x11_config, x11_test);
(wl_config, wl_test);
(xdg_decoration_config, xdg_decoration_test);
(fc_config, fc_test);
(ft_config, ft_test);
(png_config, png_test); ]
Expand Down
3 changes: 2 additions & 1 deletion src/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
qtz_sw_context qtz_hw_context
x11_keysym x11_keyboard x11_backend x11_target x11_window
x11_sw_context x11_hw_context
wl_backend wl_target wl_window
wl_backend wl_memory wl_target wl_window
wl_sw_context wl_hw_context
wl_decoration wl_keyboard xdg-shell-protocol xdg-decor-protocol
window pixmap image_interpolation filters transform draw_instr
sw_context hw_context context
font_desc gdi_font qtz_font unx_font font
Expand Down
Loading

0 comments on commit b932b68

Please sign in to comment.