From 8ca11dda9e73865ccb97c1c3563c1f10b226f633 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Fri, 20 Mar 2009 15:22:15 +0200 Subject: VO: Don't force window position in X11 VOs Disable by default the code that forcefully moved the video output window to the middle of the screen whenever it was reconfigured or created. That behavior was really annoying when switching video streams within a file, and overriding the window manager like that is not good default behavior for the initial creation of a window either. Add a new option "-force-window-position" that can be used to restore the old behavior. --- libvo/x11_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libvo') diff --git a/libvo/x11_common.c b/libvo/x11_common.c index b70c0b8dd6..434cdbd04c 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -933,7 +933,11 @@ static void vo_x11_nofs_sizepos(struct vo *vo, int x, int y, { vo->dwidth = width; vo->dheight = height; - XMoveResizeWindow(vo->x11->display, vo->x11->window, x, y, width, height); + if (vo->opts->force_window_position) + XMoveResizeWindow(vo->x11->display, vo->x11->window, x, y, width, + height); + else + XResizeWindow(vo->x11->display, vo->x11->window, width, height); } } -- cgit v1.2.3 From 7db643095995ddf625af670f6e07a61bf25d3a94 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 31 Mar 2009 02:50:34 +0300 Subject: VO: Don't reset pause status in VO config() functions Many VOs kept track of pause status, but reset the value when their config() function was called. However it can be called while playback stays in pause mode. Modify the VOs to not change anything in config(). Also send the VO either VOCTRL_PAUSE or VOCTRL_RESUME when the playback of a new file is starting to make sure they have the right status. --- libvo/vo_gl.c | 1 - libvo/vo_gl2.c | 2 -- libvo/vo_vdpau.c | 1 - libvo/vo_x11.c | 1 - libvo/vo_xv.c | 1 - 5 files changed, 6 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 2e85163833..d4a9d15093 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -538,7 +538,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin image_format = format; glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type); - int_pause = 0; vo_flipped = !!(flags & VOFLAG_FLIPPING); #ifdef CONFIG_GUI diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c index 382994e318..c545165b29 100644 --- a/libvo/vo_gl2.c +++ b/libvo/vo_gl2.c @@ -622,8 +622,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin image_width = width; image_format = format; - int_pause = 0; - #ifdef CONFIG_GUI if (use_gui) { if (config_glx_gui(d_width, d_height) == -1) diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index 085dfb4156..c920c0cd8d 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -480,7 +480,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, image_format = format; - int_pause = 0; visible_buf = 0; #ifdef CONFIG_GUI diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 4e6b1b79fb..9a50997470 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -330,7 +330,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, old_vo_dwidth = -1; old_vo_dheight = -1; - int_pause = 0; if (!title) title = "MPlayer X11 (XImage/Shm) render"; diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 178c9c4ca9..6f38c90929 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -223,7 +223,6 @@ static int config(struct vo *vo, uint32_t width, uint32_t height, return -1; } - ctx->is_paused = 0; ctx->visible_buf = -1; ctx->have_visible_image_copy = false; ctx->have_next_image_copy = false; -- cgit v1.2.3