From 68f9ee7e0b3fdddfa42fa11a15d9ae84460d5e19 Mon Sep 17 00:00:00 2001 From: Rostislav Pehlivanov Date: Sun, 1 Oct 2017 21:16:49 +0100 Subject: wayland_common: rewrite from scratch The wayland code was written more than 4 years ago when wayland wasn't even at version 1.0. This commit rewrites everything in a more modern way, switches to using the new xdg v6 shell interface which solves a lot of bugs and makes mpv tiling-friedly, adds support for drag and drop, adds support for touchscreens, adds support for KDE's server decorations protocol, and finally adds support for the new idle-inhibitor protocol. It does not yet use the frame callback as a main rendering loop driver, this will happen with a later commit. --- wscript_build.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'wscript_build.py') diff --git a/wscript_build.py b/wscript_build.py index 5d8ee616fe..25875dcfcd 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -116,6 +116,26 @@ def build(ctx): target = "player/javascript/defaults.js.inc", ) + if ctx.dependency_satisfied('wayland'): + ctx.wayland_protocol_code(proto_dir = ctx.env.WL_PROTO_DIR, + protocol = "unstable/xdg-shell/xdg-shell-unstable-v6", + target = "video/out/wayland/xdg-shell-v6.c") + ctx.wayland_protocol_header(proto_dir = ctx.env.WL_PROTO_DIR, + protocol = "unstable/xdg-shell/xdg-shell-unstable-v6", + target = "video/out/wayland/xdg-shell-v6.h") + ctx.wayland_protocol_code(proto_dir = ctx.env.WL_PROTO_DIR, + protocol = "unstable/idle-inhibit/idle-inhibit-unstable-v1", + target = "video/out/wayland/idle-inhibit-v1.c") + ctx.wayland_protocol_header(proto_dir = ctx.env.WL_PROTO_DIR, + protocol = "unstable/idle-inhibit/idle-inhibit-unstable-v1", + target = "video/out/wayland/idle-inhibit-v1.h") + ctx.wayland_protocol_code(proto_dir = "../video/out/wayland", + protocol = "server-decoration", + target = "video/out/wayland/srv-decor.c") + ctx.wayland_protocol_header(proto_dir = "../video/out/wayland", + protocol = "server-decoration", + target = "video/out/wayland/srv-decor.h") + ctx(features = "ebml_header", target = "ebml_types.h") ctx(features = "ebml_definitions", target = "ebml_defs.c") @@ -454,6 +474,9 @@ def build(ctx): ( "video/out/vulkan/spirv_nvidia.c", "vulkan" ), ( "video/out/win32/exclusive_hack.c", "gl-win32" ), ( "video/out/wayland_common.c", "wayland" ), + ( "video/out/wayland/xdg-shell-v6.c", "wayland" ), + ( "video/out/wayland/idle-inhibit-v1.c", "wayland" ), + ( "video/out/wayland/srv-decor.c", "wayland" ), ( "video/out/win_state.c"), ( "video/out/x11_common.c", "x11" ), ( "video/out/drm_common.c", "drm" ), -- cgit v1.2.3