diff --git a/Makefile.common b/Makefile.common index 47a567c99f..d400a480fa 100644 --- a/Makefile.common +++ b/Makefile.common @@ -867,7 +867,8 @@ ifeq ($(HAVE_WAYLAND), 1) input/drivers/wayland_input.o \ gfx/common/wayland/xdg-shell.o \ gfx/common/wayland/xdg-shell-unstable-v6.o \ - gfx/common/wayland/idle-inhibit-unstable-v1.o + gfx/common/wayland/idle-inhibit-unstable-v1.o \ + gfx/common/wayland/xdg-decoration-unstable-v1.o ifeq ($(HAVE_EGL), 1) LIBS += $(EGL_LIBS) endif diff --git a/gfx/common/wayland/generate_wayland_protos.sh b/gfx/common/wayland/generate_wayland_protos.sh index 22e19281cf..8c0cc7f155 100755 --- a/gfx/common/wayland/generate_wayland_protos.sh +++ b/gfx/common/wayland/generate_wayland_protos.sh @@ -9,12 +9,16 @@ fi #Generate xdg-shell_v6 header and .c files $WAYSCAN client-header $WAYLAND_PROTOS/unstable/xdg-shell/xdg-shell-unstable-v6.xml $OUTPUT/xdg-shell-unstable-v6.h -$WAYSCAN code $WAYLAND_PROTOS/unstable/xdg-shell/xdg-shell-unstable-v6.xml $OUTPUT/xdg-shell-unstable-v6.c +$WAYSCAN private-code $WAYLAND_PROTOS/unstable/xdg-shell/xdg-shell-unstable-v6.xml $OUTPUT/xdg-shell-unstable-v6.c #Generate xdg-shell header and .c files $WAYSCAN client-header $WAYLAND_PROTOS/stable/xdg-shell/xdg-shell.xml $OUTPUT/xdg-shell.h -$WAYSCAN code $WAYLAND_PROTOS/stable/xdg-shell/xdg-shell.xml $OUTPUT/xdg-shell.c +$WAYSCAN private-code $WAYLAND_PROTOS/stable/xdg-shell/xdg-shell.xml $OUTPUT/xdg-shell.c #Generate idle-inhibit header and .c files $WAYSCAN client-header $WAYLAND_PROTOS/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml $OUTPUT/idle-inhibit-unstable-v1.h -$WAYSCAN code $WAYLAND_PROTOS/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml $OUTPUT/idle-inhibit-unstable-v1.c +$WAYSCAN private-code $WAYLAND_PROTOS/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml $OUTPUT/idle-inhibit-unstable-v1.c + +#Generate xdg-decoration header and .c files +$WAYSCAN client-header $WAYLAND_PROTOS/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml $OUTPUT/xdg-decoration-unstable-v1.h +$WAYSCAN private-code $WAYLAND_PROTOS/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml $OUTPUT/xdg-decoration-unstable-v1.c diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 138f485935..d05c65d321 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -56,6 +56,9 @@ /* Generated from xdg-shell.xml */ #include "../common/wayland/xdg-shell.h" +/* Generated from xdg-decoration-unstable-v1.h */ +#include "../common/wayland/xdg-decoration-unstable-v1.h" + typedef struct touch_pos { @@ -103,6 +106,8 @@ typedef struct gfx_ctx_wayland_data struct wl_touch *wl_touch; struct wl_seat *seat; struct wl_shm *shm; + struct zxdg_decoration_manager_v1 *deco_manager; + struct zxdg_toplevel_decoration_v1 *deco; struct zwp_idle_inhibit_manager_v1 *idle_inhibit_manager; struct zwp_idle_inhibitor_v1 *idle_inhibitor; int swap_interval; @@ -842,6 +847,9 @@ static void registry_handle_global(void *data, struct wl_registry *reg, else if (string_is_equal(interface, "zwp_idle_inhibit_manager_v1")) wl->idle_inhibit_manager = (struct zwp_idle_inhibit_manager_v1*)wl_registry_bind( reg, id, &zwp_idle_inhibit_manager_v1_interface, 1); + else if (string_is_equal(interface, "zxdg_decoration_manager_v1")) + wl->deco_manager = (struct zxdg_decoration_manager_v1*)wl_registry_bind( + reg, id, &zxdg_decoration_manager_v1_interface, 1); } static void registry_handle_global_remove(void *data, @@ -938,6 +946,10 @@ static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl) wl_shell_surface_destroy(wl->shell_surf); if (wl->idle_inhibit_manager) zwp_idle_inhibit_manager_v1_destroy(wl->idle_inhibit_manager); + if (wl->deco) + zxdg_toplevel_decoration_v1_destroy(wl->deco); + if (wl->deco_manager) + zxdg_decoration_manager_v1_destroy(wl->deco_manager); if (wl->idle_inhibitor) zwp_idle_inhibitor_v1_destroy(wl->idle_inhibitor); diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 233fd9760a..d31c45c589 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -457,7 +457,7 @@ check_pkgconf X11 x11 check_pkgconf XCB xcb check_pkgconf WAYLAND wayland-egl 1.14 check_pkgconf WAYLAND_CURSOR wayland-cursor 1.14 -check_pkgconf WAYLAND_PROTOS wayland-protocols 1.13 +check_pkgconf WAYLAND_PROTOS wayland-protocols 1.15 check_pkgconf XKBCOMMON xkbcommon 0.3.2 check_pkgconf DBUS dbus-1 check_pkgconf XEXT xext