[MPlayer-dev-eng] [PATCH] Re: New Feature: -splash (disables decorations)

Robert Goliasz robert.goliasz at uk.clara.net
Sun Jul 15 16:26:48 CEST 2007


Here's a version that applies to Subversion revision 23784:

http://www.uukgoblin.net/mplayer-svn-23784-splash.patch

(I've attached it to this email as well)

I've also updated the manpage so it's easier to find the -splash option
when you're looking at -border (and placed -splash alphabetically).

-- 
Robert Goliasz
-------------- next part --------------
diff -ru mplayer-svn-23784/DOCS/man/en/mplayer.1 mplayer-svn-23784-splash/DOCS/man/en/mplayer.1
--- mplayer-svn-23784/DOCS/man/en/mplayer.1	2007-07-15 15:01:18.000000000 +0100
+++ mplayer-svn-23784-splash/DOCS/man/en/mplayer.1	2007-07-15 15:09:44.000000000 +0100
@@ -2671,7 +2671,7 @@
 Play movie with window border and decorations.
 Since this is on by default, use \-noborder to disable the standard window
 decorations.
-Supported by the directx video output driver.
+Supported by the directx video output driver. Also check \-splash.
 .
 .TP
 .B \-brightness <-100\-100>
@@ -2994,6 +2994,11 @@
 do not know the screen resolution like fbdev, x11 and TVout.
 .
 .TP
+.B \-splash
+Try to open the movie window as a splash window. This will effect in the window 
+having no borders or decorations. Your window manager has to support this.
+.
+.TP
 .B \-stop-xscreensaver (X11 only)
 Turns off xscreensaver at startup and turns it on again on exit.
 .
diff -ru mplayer-svn-23784/cfg-mplayer.h mplayer-svn-23784-splash/cfg-mplayer.h
--- mplayer-svn-23784/cfg-mplayer.h	2007-07-15 15:01:23.000000000 +0100
+++ mplayer-svn-23784-splash/cfg-mplayer.h	2007-07-15 15:03:36.000000000 +0100
@@ -46,6 +46,7 @@
 extern char *vo_geometry;
 extern int vo_ontop;
 extern int vo_border;
+extern int vo_splash;
 extern int vo_keepaspect;
 extern int vo_rootwin;
 
@@ -142,6 +143,7 @@
 	{"rootwin", &vo_rootwin, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"border", &vo_border, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"noborder", &vo_border, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+	{"splash", &vo_splash, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 
 	{"aop", "-aop has been removed, use -af instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 	{"dsp", "-dsp has been removed. Use -ao oss:dsp_path instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
diff -ru mplayer-svn-23784/libvo/video_out.c mplayer-svn-23784-splash/libvo/video_out.c
--- mplayer-svn-23784/libvo/video_out.c	2007-07-15 15:01:15.000000000 +0100
+++ mplayer-svn-23784-splash/libvo/video_out.c	2007-07-15 15:03:36.000000000 +0100
@@ -52,6 +52,7 @@
 int vo_keepaspect=1;
 int vo_rootwin=0;
 int vo_border=1;
+int vo_splash=0;
 int WinID = -1;
 
 int vo_pts=0; // for hw decoding
diff -ru mplayer-svn-23784/libvo/video_out.h mplayer-svn-23784-splash/libvo/video_out.h
--- mplayer-svn-23784/libvo/video_out.h	2007-07-15 15:01:15.000000000 +0100
+++ mplayer-svn-23784-splash/libvo/video_out.h	2007-07-15 15:03:36.000000000 +0100
@@ -219,6 +219,7 @@
 extern int vo_rootwin;
 extern int vo_ontop;
 extern int vo_border;
+extern int vo_splash;
 
 extern int vo_gamma_brightness;
 extern int vo_gamma_saturation;
diff -ru mplayer-svn-23784/libvo/x11_common.c mplayer-svn-23784-splash/libvo/x11_common.c
--- mplayer-svn-23784/libvo/x11_common.c	2007-07-15 15:01:15.000000000 +0100
+++ mplayer-svn-23784-splash/libvo/x11_common.c	2007-07-15 15:03:36.000000000 +0100
@@ -1257,6 +1257,20 @@
     ret_win =
         XCreateWindow(mDisplay, mRootWin, x, y, width, height, 0, depth,
                       CopyFromParent, vis, xswamask, &xswa);
+
+	mp_msg(MSGT_VO, MSGL_V, "vo_splash is %d\n", vo_splash);
+	if(vo_splash)
+	{
+		Atom the_atom = XInternAtom(mDisplay, "_NET_WM_WINDOW_TYPE_SPLASH", False);
+		XChangeProperty(mDisplay, ret_win,
+			XInternAtom(mDisplay, "_NET_WM_WINDOW_TYPE", False),
+			XInternAtom(mDisplay, "ATOM[]/32", False),
+			32,
+			PropModePrepend,
+			(unsigned char*) &the_atom,
+			1);
+	}
+
     XSetWMProtocols(mDisplay, ret_win, &XAWM_DELETE_WINDOW, 1);
     if (!f_gc)
         f_gc = XCreateGC(mDisplay, ret_win, 0, 0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070715/05f01e6f/attachment.pgp>


More information about the MPlayer-dev-eng mailing list