[packages/mpv] - up to 0.6.1 - added xmonad fullscreen patch from git - package docs

atler atler at pld-linux.org
Mon Oct 13 23:23:21 CEST 2014


commit a68f52bab444e594ca1c994154ee459589abc6f8
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Oct 13 23:22:43 2014 +0200

    - up to 0.6.1
    - added xmonad fullscreen patch from git
    - package docs

 mpv-xmonad_fullscreen.patch | 97 +++++++++++++++++++++++++++++++++++++++++++++
 mpv.spec                    | 11 +++--
 2 files changed, 105 insertions(+), 3 deletions(-)
---
diff --git a/mpv.spec b/mpv.spec
index 23be9c1..c9eb70d 100644
--- a/mpv.spec
+++ b/mpv.spec
@@ -1,14 +1,15 @@
 Summary:	Movie player based on MPlayer and mplayer2
 Name:		mpv
-Version:	0.6.0
-Release:	2
+Version:	0.6.1
+Release:	1
 License:	GPL v2+
 Group:		Applications/Multimedia
 Source0:	http://github.com/mpv-player/mpv/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
-# Source0-md5:	ac06561522ac1767cd05987ea85e827c
+# Source0-md5:	a6060358a47a5a7cfc1123b8f74dd5ab
 Source1:	%{name}.conf
 Patch0:		%{name}-zshcompdir.patch
 Patch1:		%{name}-lua.patch
+Patch2:		%{name}-xmonad_fullscreen.patch
 URL:		http://mpv.io/
 BuildRequires:	Mesa-libwayland-egl-devel >= 9.0.0
 BuildRequires:	OpenAL-devel >= 1.13
@@ -95,6 +96,7 @@ zsh-completion for mpv.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %waf configure \
@@ -174,11 +176,14 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mpv
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mpv
 
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%doc README.md RELEASE_NOTES etc/example.conf etc/input.conf etc/mplayer-input.conf etc/restore-old-bindings.conf
 %dir %{_sysconfdir}/mpv
 %{_sysconfdir}/mpv/encoding-profiles.conf
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/mpv.conf
diff --git a/mpv-xmonad_fullscreen.patch b/mpv-xmonad_fullscreen.patch
new file mode 100755
index 0000000..3c2154e
--- /dev/null
+++ b/mpv-xmonad_fullscreen.patch
@@ -0,0 +1,97 @@
+From 54fd93856a3b34c92d0dd9e8cc972b57a92d1a5e Mon Sep 17 00:00:00 2001
+From: wm4 <wm4 at nowhere>
+Date: Sat, 4 Oct 2014 15:03:02 +0200
+Subject: [PATCH] x11: stupid workaround for XMonad
+
+--x11-netwm=yes now forces NetWM fullscreen, while --x11-netwm=auto
+(detect whether NetWM fullsctreen support is available) is the old
+behavior and still the default.
+
+See #888.
+---
+ DOCS/man/options.rst   | 18 ++++++++++++++----
+ options/options.c      |  4 ++--
+ video/out/x11_common.c |  6 +++++-
+ 3 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
+index b187259..69525ae 100644
+--- a/DOCS/man/options.rst
++++ b/DOCS/man/options.rst
+@@ -1708,16 +1708,26 @@ Window
+ ``--x11-name``
+     Set the window class name for X11-based video output methods.
+ 
+-``--x11-netwm=no``
++``--x11-netwm=<yes|no|auto>``
+     (X11 only)
+-    Disable use of the NetWM protocol when switching to or from fullscreen.
++    Control the use of NetWM protocol features.
++
+     This may or may not help with broken window managers. This provides some
+     functionality that was implemented by the now removed ``--fstype`` option.
+     Actually, it is not known to the developers to which degree this option
+     was needed, so feedback is welcome.
+ 
+-    By default, NetWM support is autodetected, and using this option forces
+-    autodetection to fail.
++    Specifically, ``yes`` will force use of NetWM fullscreen support, even if
++    not advertised by the WM. This can be useful for WMs that are broken on
++    purpose, like XMonad. (XMonad supposedly doesn't advertise fullscreen
++    support, because Flash uses it. Apparently, applications which want to
++    use fullscreen anyway are supposed to either ignore the NetWM support hints,
++    or provide a workaround. Shame on XMonad for deliberately breaking X
++    protocols (as if X isn't bad enough already).
++
++    By default, NetWM support is autodetected (``auto``).
++
++    This option might be removed in the future.
+ 
+ 
+ Disc Devices
+diff --git a/options/options.c b/options/options.c
+index bc016df..1639719 100644
+--- a/options/options.c
++++ b/options/options.c
+@@ -431,7 +431,8 @@ const m_option_t mp_opts[] = {
+ 
+     OPT_INT64("wid", vo.WinID, CONF_GLOBAL),
+ #if HAVE_X11
+-    OPT_FLAG("x11-netwm", vo.x11_netwm, 0),
++    OPT_CHOICE("x11-netwm", vo.x11_netwm, 0,
++               ({"auto", 0}, {"no", -1}, {"yes", 1})),
+ #endif
+     OPT_STRING("heartbeat-cmd", heartbeat_cmd, 0),
+     OPT_FLOAT("heartbeat-interval", heartbeat_interval, CONF_MIN, 0),
+@@ -573,7 +574,6 @@ const struct MPOpts mp_default_opts = {
+         .keepaspect = 1,
+         .border = 1,
+         .WinID = -1,
+-        .x11_netwm = 1,
+     },
+     .allow_win_drag = 1,
+     .wintitle = "mpv - ${media-title}",
+diff --git a/video/out/x11_common.c b/video/out/x11_common.c
+index 140069e..aed54f9 100644
+--- a/video/out/x11_common.c
++++ b/video/out/x11_common.c
+@@ -308,7 +308,7 @@ static int vo_wm_detect(struct vo *vo)
+                             &nitems);
+     if (args) {
+         MP_VERBOSE(x11, "Detected wm supports NetWM.\n");
+-        if (vo->opts->x11_netwm) {
++        if (vo->opts->x11_netwm >= 0) {
+             for (i = 0; i < nitems; i++)
+                 wm |= net_wm_support_state_test(vo->x11, args[i]);
+         } else {
+@@ -319,6 +319,10 @@ static int vo_wm_detect(struct vo *vo)
+ 
+     if (wm == 0)
+         MP_VERBOSE(x11, "Unknown wm type...\n");
++    if (vo->opts->x11_netwm > 0 && !(wm & vo_wm_FULLSCREEN)) {
++        MP_WARN(x11, "Forcing NetWM FULLSCREEN support.\n");
++        wm |= vo_wm_FULLSCREEN;
++    }
+     return wm;
+ }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mpv.git/commitdiff/a68f52bab444e594ca1c994154ee459589abc6f8



More information about the pld-cvs-commit mailing list