summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2017-10-01 21:16:49 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2017-10-03 19:36:02 +0100
commit68f9ee7e0b3fdddfa42fa11a15d9ae84460d5e19 (patch)
tree91b3c4dd976c54a241dc17d04ccdd15e1cf70ff8 /wscript_build.py
parent980116360b0f393e16064ec3b7a4ef9efb14372e (diff)
downloadmpv-68f9ee7e0b3fdddfa42fa11a15d9ae84460d5e19.tar.bz2
mpv-68f9ee7e0b3fdddfa42fa11a15d9ae84460d5e19.tar.xz
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.
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py23
1 files changed, 23 insertions, 0 deletions
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" ),