summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorptt <ptt@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-12 09:21:53 +0000
committerptt <ptt@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-12 09:21:53 +0000
commitab4bdb64e1010be0b408012a79629d05a663b7a1 (patch)
tree24d6c4dcafee8b323b7a373cc705bb59c05c82d5 /libvo
parent153cac185c2d38aef1c322ea3bfa2b97befbb8d9 (diff)
downloadmpv-ab4bdb64e1010be0b408012a79629d05a663b7a1.tar.bz2
mpv-ab4bdb64e1010be0b408012a79629d05a663b7a1.tar.xz
Added -name, -title and -use-filename-title options and implementation in X11 vos
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29904 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/video_out.c5
-rw-r--r--libvo/video_out.h3
-rw-r--r--libvo/x11_common.c5
3 files changed, 12 insertions, 1 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index e636902d2e..ec4cd9c109 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -79,6 +79,11 @@ int vo_directrendering=0;
int vo_colorkey = 0x0000ff00; // default colorkey is green
// (0xff000000 means that colorkey has been disabled)
+// name to be used instead of the vo's default
+char *vo_winname;
+// title to be applied to movie window
+char *vo_wintitle;
+
//
// Externally visible list of all vo drivers
//
diff --git a/libvo/video_out.h b/libvo/video_out.h
index ae38970209..b143ff5554 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -250,6 +250,9 @@ extern char *vo_subdevice;
extern int vo_colorkey;
+extern char *vo_winname;
+extern char *vo_wintitle;
+
extern int64_t WinID;
typedef struct {
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 1c8a2785c9..d1911401ce 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -738,7 +738,7 @@ void vo_x11_classhint(Display * display, Window window, char *name)
XClassHint wmClass;
pid_t pid = getpid();
- wmClass.res_name = name;
+ wmClass.res_name = vo_winname ? vo_winname : name;
wmClass.res_class = "MPlayer";
XSetClassHint(display, window, &wmClass);
XChangeProperty(display, window, XA_NET_WM_PID, XA_CARDINAL, 32,
@@ -1335,6 +1335,9 @@ int vo_x11_update_geometry(void) {
if (w <= INT_MAX && h <= INT_MAX) { vo_dwidth = w; vo_dheight = h; }
XTranslateCoordinates(mDisplay, vo_window, mRootWin, 0, 0, &vo_dx, &vo_dy,
&dummy_win);
+ if (vo_wintitle)
+ XStoreName(mDisplay, vo_window, vo_wintitle);
+
return depth <= INT_MAX ? depth : 0;
}