Initial support for xdg-decoration-unstable-v1

This commit is contained in:
Sunderland93 2018-12-05 22:51:07 +04:00
parent 2b6fbbdfe0
commit dc94886664
4 changed files with 22 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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