Index: cfg-mplayer.h =================================================================== RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v retrieving revision 1.208 diff -u -r1.208 cfg-mplayer.h --- cfg-mplayer.h 22 Oct 2003 13:21:23 -0000 1.208 +++ cfg-mplayer.h 27 Oct 2003 09:20:47 -0000 @@ -84,6 +84,7 @@ extern int vo_x11_keepaspect; extern char **vo_fstype_list; extern int vo_nomouse_input; +extern int vo_ontop; #endif #ifdef HAVE_AA @@ -295,6 +296,8 @@ {"nokeepaspect", &vo_x11_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"fstype", &vo_fstype_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, {"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0,0,-1,NULL}, + {"ontop", &vo_ontop, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"noontop", &vo_ontop, CONF_TYPE_FLAG, 0, 1, 0, NULL}, #endif #ifdef HAVE_XINERAMA Index: mplayer.c =================================================================== RCS file: /cvsroot/mplayer/main/mplayer.c,v retrieving revision 1.734 diff -u -r1.734 mplayer.c --- mplayer.c 23 Oct 2003 22:44:25 -0000 1.734 +++ mplayer.c 27 Oct 2003 09:21:02 -0000 @@ -3001,6 +3001,11 @@ #endif if(video_out && vo_config_count) video_out->control(VOCTRL_FULLSCREEN, 0); } break; + case MP_CMD_VO_ONTOP: + { + if(video_out) video_out->control(VOCTRL_ONTOP, 0); + + } break; case MP_CMD_PANSCAN : { if ( !video_out ) break; if ( video_out->control( VOCTRL_GET_PANSCAN,NULL ) == VO_TRUE ) Index: DOCS/man/en/mplayer.1 =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v retrieving revision 1.468 diff -u -r1.468 mplayer.1 --- DOCS/man/en/mplayer.1 26 Oct 2003 14:58:14 -0000 1.468 +++ DOCS/man/en/mplayer.1 27 Oct 2003 09:21:19 -0000 @@ -278,6 +278,8 @@ mute sound .IPs f\ \ \ \ toggle fullscreen +.IPs T\ \ \ \ +toggle stay-on-top .IPs "w and e" decrease/\:increase panscan range .IPs o\ \ \ \ @@ -1803,6 +1805,10 @@ .TP .B \-noxv (SDL only) Disables XVideo SDL driver. +.TP +.B \-ontop +Makes the player window stay on top of other windows. +Supported by all X11 vo drivers, except sdl. .TP .B \-panscan <0.0\-1.0> Enables Pan & Scan functionality, i.e.\& in order to display a 16:9 movie Index: DOCS/tech/slave.txt =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/tech/slave.txt,v retrieving revision 1.8 diff -u -r1.8 slave.txt --- DOCS/tech/slave.txt 22 Sep 2003 09:19:41 -0000 1.8 +++ DOCS/tech/slave.txt 27 Oct 2003 09:21:20 -0000 @@ -59,6 +59,8 @@ Switch to fullscreen mode. get_vo_fullscreen Print out fullscreen status (1 == fullscreened, 0 == windowed). +vo_ontop + Toggle stay-on-top. panscan value [value2] ??? loadfile url Index: DOCS/xml/en/usage.xml =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/xml/en/usage.xml,v retrieving revision 1.12 diff -u -r1.12 usage.xml --- DOCS/xml/en/usage.xml 26 Oct 2003 14:58:15 -0000 1.12 +++ DOCS/xml/en/usage.xml 27 Oct 2003 09:21:22 -0000 @@ -295,6 +295,10 @@ Switch fullscreen mode. +vo_ontop + + Toggle stay-on-top. + tv_step_channel (int) dir Select next/previous tv channel. Index: Gui/wm/ws.c =================================================================== RCS file: /cvsroot/mplayer/main/Gui/wm/ws.c,v retrieving revision 1.71 diff -u -r1.71 ws.c --- Gui/wm/ws.c 14 Aug 2003 01:45:16 -0000 1.71 +++ Gui/wm/ws.c 27 Oct 2003 09:21:28 -0000 @@ -779,6 +779,9 @@ vo_x11_decoration( wsDisplay,win->WindowID,decoration ); vo_x11_sizehint( win->X,win->Y,win->Width,win->Height,0 ); vo_x11_setlayer( wsDisplay,win->WindowID,win->isFullScreen ); + +if ((!(win->isFullScreen)) & vo_ontop) vo_x11_setlayer(wsDisplay, win->WindowID,1); + if ( vo_wm_type == 0 && !(vo_fsmode&16) ) XWithdrawWindow( wsDisplay,win->WindowID,wsScreen ); XMoveResizeWindow( wsDisplay,win->WindowID,win->X,win->Y,win->Width,win->Height ); Index: etc/example.conf =================================================================== RCS file: /cvsroot/mplayer/main/etc/example.conf,v retrieving revision 1.52 diff -u -r1.52 example.conf --- etc/example.conf 14 May 2003 22:49:02 -0000 1.52 +++ etc/example.conf 27 Oct 2003 09:21:30 -0000 @@ -34,6 +34,9 @@ # monitoraspect=4:3 # standard monitor size, with square pixels # monitoraspect=16:9 # use this for widescreen monitor! non-square pixels +# ontop=yes # Makes the players window stay ontop + # Used by drivers that uses x11, except sdl + ## ## Specify your preferred default skin here ## (skins are searched in /usr/local/share/mplayer/Skin/yourskin Index: etc/input.conf =================================================================== RCS file: /cvsroot/mplayer/main/etc/input.conf,v retrieving revision 1.10 diff -u -r1.10 input.conf --- etc/input.conf 5 May 2003 03:13:43 -0000 1.10 +++ etc/input.conf 27 Oct 2003 09:21:30 -0000 @@ -47,6 +47,7 @@ #? sub_step +1 # immediately display next subtitle #? sub_step -1 # previous f vo_fullscreen +T vo_ontop w panscan -0.1 e panscan +0.1 Index: input/input.c =================================================================== RCS file: /cvsroot/mplayer/main/input/input.c,v retrieving revision 1.86 diff -u -r1.86 input.c --- input/input.c 21 Sep 2003 14:21:43 -0000 1.86 +++ input/input.c 27 Oct 2003 09:21:35 -0000 @@ -98,6 +98,7 @@ { MP_CMD_DVB_SET_CHANNEL, "dvb_set_channel", 1, { { MP_CMD_ARG_INT, {0}}, {-1,{0}} }}, #endif { MP_CMD_VO_FULLSCREEN, "vo_fullscreen", 0, { {-1,{0}} } }, + { MP_CMD_VO_ONTOP, "vo_ontop", 0, { {-1,{0}} } }, { MP_CMD_SCREENSHOT, "screenshot", 0, { {-1,{0}} } }, { MP_CMD_PANSCAN, "panscan",1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, @@ -330,6 +331,7 @@ { { JOY_BTN2, 0 }, "volume 1"}, { { JOY_BTN3, 0 }, "volume -1"}, #endif + { { 'T', 0 }, "vo_ontop" }, { { 'f', 0 }, "vo_fullscreen" }, { { 's', 0 }, "screenshot" }, { { 'w', 0 }, "panscan -0.1" }, Index: input/input.h =================================================================== RCS file: /cvsroot/mplayer/main/input/input.h,v retrieving revision 1.39 diff -u -r1.39 input.h --- input/input.h 21 Sep 2003 14:21:43 -0000 1.39 +++ input/input.h 27 Oct 2003 09:21:36 -0000 @@ -52,6 +52,7 @@ #define MP_CMD_GET_VO_FULLSCREEN 48 #define MP_CMD_GET_SUB_VISIBILITY 49 #define MP_CMD_SUB_FORCED_ONLY 50 +#define MP_CMD_VO_ONTOP 51 #define MP_CMD_GUI_EVENTS 5000 #define MP_CMD_GUI_LOADFILE 5001 Index: libvo/mga_common.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/mga_common.c,v retrieving revision 1.57 diff -u -r1.57 mga_common.c --- libvo/mga_common.c 1 Jun 2003 21:59:28 -0000 1.57 +++ libvo/mga_common.c 27 Oct 2003 09:21:41 -0000 @@ -324,6 +324,9 @@ #endif #ifdef VO_XMGA + case VOCTRL_ONTOP: + vo_x11_fullscreen(); + return VO_TRUE; case VOCTRL_GET_PANSCAN: if ( !inited || !vo_fs ) return VO_FALSE; return VO_TRUE; Index: libvo/video_out.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/video_out.c,v retrieving revision 1.79 diff -u -r1.79 video_out.c --- libvo/video_out.c 17 Oct 2003 09:08:37 -0000 1.79 +++ libvo/video_out.c 27 Oct 2003 09:21:42 -0000 @@ -40,6 +40,7 @@ int vo_fs = 0; int vo_fsmode = 0; float vo_panscan = 0.0f; +int vo_ontop = 0; int vo_pts=0; // for hw decoding float vo_fps=0; // for mp1e rte Index: libvo/video_out.h =================================================================== RCS file: /cvsroot/mplayer/main/libvo/video_out.h,v retrieving revision 1.53 diff -u -r1.53 video_out.h --- libvo/video_out.h 3 Oct 2003 18:13:45 -0000 1.53 +++ libvo/video_out.h 27 Oct 2003 09:21:43 -0000 @@ -55,6 +55,8 @@ // ... 21 #define VOCTRL_START_SLICE 21 +#define VOCTRL_ONTOP 25 + // Vo can be used by xover #define VOCTRL_XOVERLAY_SUPPORT 22 Index: libvo/vo_gl.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v retrieving revision 1.37 diff -u -r1.37 vo_gl.c --- libvo/vo_gl.c 21 Sep 2003 15:44:23 -0000 1.37 +++ libvo/vo_gl.c 27 Oct 2003 09:21:44 -0000 @@ -207,6 +207,8 @@ saver_off(mDisplay); // turning off screen saver + if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, 1); + return 0; } @@ -314,6 +316,9 @@ case VOCTRL_RESUME: return (int_pause=0); case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data)); + case VOCTRL_ONTOP: + vo_x11_ontop(); + return VO_TRUE; case VOCTRL_FULLSCREEN: vo_x11_fullscreen(); return VO_TRUE; Index: libvo/vo_gl2.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v retrieving revision 1.38 diff -u -r1.38 vo_gl2.c --- libvo/vo_gl2.c 12 Oct 2003 14:42:27 -0000 1.38 +++ libvo/vo_gl2.c 27 Oct 2003 09:21:49 -0000 @@ -1007,7 +1007,10 @@ #ifndef GL_WIN32 saver_off(mDisplay); #endif - + if (vo_ontop){ + vo_ontop = (!(vo_ontop)); + vo_x11_ontop(); + } return 0; } @@ -1172,6 +1175,9 @@ case VOCTRL_RESUME: return (int_pause=0); case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data)); + case VOCTRL_ONTOP: + vo_x11_ontop(); + return VO_TRUE; case VOCTRL_FULLSCREEN: #ifdef GL_WIN32 vo_w32_fullscreen(); Index: libvo/vo_x11.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v retrieving revision 1.135 diff -u -r1.135 vo_x11.c --- libvo/vo_x11.c 4 Oct 2003 17:29:04 -0000 1.135 +++ libvo/vo_x11.c 27 Oct 2003 09:22:00 -0000 @@ -435,6 +435,9 @@ #endif saver_off(mDisplay); + + if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, 1); + return 0; } @@ -657,6 +660,9 @@ va_end(ap); return vo_x11_get_equalizer(data, value); } + case VOCTRL_ONTOP: + vo_x11_ontop(); + return VO_TRUE; case VOCTRL_FULLSCREEN: { vo_x11_fullscreen(); Index: libvo/vo_xmga.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v retrieving revision 1.85 diff -u -r1.85 vo_xmga.c --- libvo/vo_xmga.c 3 Oct 2003 18:13:45 -0000 1.85 +++ libvo/vo_xmga.c 27 Oct 2003 09:22:00 -0000 @@ -221,6 +221,8 @@ saver_off(mDisplay); + if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, 1); + XFlush( mDisplay ); XSync( mDisplay,False ); Index: libvo/vo_xover.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_xover.c,v retrieving revision 1.5 diff -u -r1.5 vo_xover.c --- libvo/vo_xover.c 3 Oct 2003 18:13:45 -0000 1.5 +++ libvo/vo_xover.c 27 Oct 2003 09:22:02 -0000 @@ -192,6 +192,9 @@ XSetForeground(mDisplay, vo_gc, colorkey); XFillRectangle(mDisplay, vo_window, vo_gc, drwX, drwY, drwWidth, (vo_fs ? drwHeight - 1 : drwHeight)); + + if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window,1); + /* flush, update drawable */ XFlush(mDisplay); @@ -455,6 +458,9 @@ return VO_TRUE; case VOCTRL_GET_PANSCAN: if ( !vo_config_count || !vo_fs ) return VO_FALSE; + return VO_TRUE; + case VOCTRL_ONTOP: + vo_x11_ontop(); return VO_TRUE; case VOCTRL_FULLSCREEN: vo_x11_fullscreen(); Index: libvo/vo_xv.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v retrieving revision 1.150 diff -u -r1.150 vo_xv.c --- libvo/vo_xv.c 19 Oct 2003 21:13:39 -0000 1.150 +++ libvo/vo_xv.c 27 Oct 2003 09:22:06 -0000 @@ -346,6 +346,9 @@ mp_msg(MSGT_VO,MSGL_V, "[xv] dx: %d dy: %d dw: %d dh: %d\n",drwX,drwY,vo_dwidth,vo_dheight ); saver_off(mDisplay); // turning off screen saver + + if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, 1); + return 0; } @@ -749,6 +752,9 @@ return(vo_xv_get_eq(xv_port, data, value)); } + case VOCTRL_ONTOP: + vo_x11_ontop(); + return VO_TRUE; } return VO_NOTIMPL; } Index: libvo/vo_xvidix.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_xvidix.c,v retrieving revision 1.64 diff -u -r1.64 vo_xvidix.c --- libvo/vo_xvidix.c 22 Oct 2003 13:22:00 -0000 1.64 +++ libvo/vo_xvidix.c 27 Oct 2003 09:22:08 -0000 @@ -368,6 +368,8 @@ panscan_calc(); + if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, 1); + saver_off(mDisplay); /* turning off screen saver */ return(0); @@ -465,6 +467,9 @@ return VO_TRUE; case VOCTRL_GET_PANSCAN: if ( !vo_config_count || !vo_fs ) return VO_FALSE; + return VO_TRUE; + case VOCTRL_ONTOP: + vo_x11_ontop(); return VO_TRUE; case VOCTRL_FULLSCREEN: vo_x11_fullscreen(); Index: libvo/vo_xvmc.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_xvmc.c,v retrieving revision 1.7 diff -u -r1.7 vo_xvmc.c --- libvo/vo_xvmc.c 28 Aug 2003 22:11:42 -0000 1.7 +++ libvo/vo_xvmc.c 27 Oct 2003 09:22:14 -0000 @@ -792,6 +792,8 @@ mp_msg(MSGT_VO,MSGL_V, "[xvmc] dx: %d dy: %d dw: %d dh: %d\n",drwX,drwY,vo_dwidth,vo_dheight ); + if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window,1); + saver_off(mDisplay); // turning off screen saver //end vo_xv @@ -1407,6 +1409,9 @@ //vo_xv case VOCTRL_GUISUPPORT: return VO_TRUE; + case VOCTRL_ONTOP: + vo_x11_ontop(); + return VO_TRUE; case VOCTRL_FULLSCREEN: vo_x11_fullscreen(); case VOCTRL_GET_PANSCAN: Index: libvo/x11_common.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v retrieving revision 1.159 diff -u -r1.159 x11_common.c --- libvo/x11_common.c 24 Sep 2003 07:38:57 -0000 1.159 +++ libvo/x11_common.c 27 Oct 2003 09:22:21 -0000 @@ -1050,6 +1050,9 @@ vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 0 : 1 ); vo_x11_sizehint( x,y,w,h,0 ); vo_x11_setlayer( mDisplay,vo_window,vo_fs ); + + if ((!(vo_fs)) & vo_ontop) vo_x11_setlayer(mDisplay, vo_window,1); + if(vo_wm_type==0 && !(vo_fsmode&16)) // XUnmapWindow( mDisplay,vo_window ); // required for MWM XWithdrawWindow(mDisplay,vo_window,mScreen); @@ -1060,6 +1063,13 @@ XMapRaised( mDisplay,vo_window ); XRaiseWindow( mDisplay,vo_window ); XFlush( mDisplay ); +} + +void vo_x11_ontop( void ) +{ + vo_ontop = (!(vo_ontop)); + + vo_x11_setlayer(mDisplay, vo_window, vo_ontop); } /* Index: libvo/x11_common.h =================================================================== RCS file: /cvsroot/mplayer/main/libvo/x11_common.h,v retrieving revision 1.33 diff -u -r1.33 x11_common.h --- libvo/x11_common.h 12 Sep 2003 15:48:33 -0000 1.33 +++ libvo/x11_common.h 27 Oct 2003 09:22:21 -0000 @@ -27,6 +27,7 @@ extern int vo_wm_type; extern int vo_fs_type; extern char** vo_fstype_list; +extern int vo_ontop; extern char *mDisplayName; extern Display *mDisplay; @@ -60,6 +61,7 @@ extern void vo_x11_clearwindow_part(Display *mDisplay, Window vo_window, int img_width, int img_height, int use_fs); extern void vo_x11_clearwindow( Display *mDisplay, Window vo_window ); +extern void vo_x11_ontop(); #endif