[MPlayer-dev-eng] [patch] vo_x11 calculate panscan on resize
Alexander Strasser
eclipse7 at gmx.net
Sun Apr 10 14:46:27 CEST 2005
Hi,
Jindrich Makovicka wrote:
> currently, vo_xv updates panscan variables just when VOCTRL_FULLSCREEN
> is called, which means they are not synchronized with the physical
> display dimensions. This can cause vo_draw_text being called with bogus
> dimensions between the update of vo_panscan_x and vo_dwidth.
>
> The attached patch moves the call of panscan_calc() to the event loop,
> so all relevant variables stay synchronized.
Will give it a test and commit something similar if it doesn't make problems.
> Index: vo_xv.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
> retrieving revision 1.161
> diff -u -r1.161 vo_xv.c
> --- vo_xv.c 24 Feb 2005 17:46:19 -0000 1.161
> +++ vo_xv.c 10 Apr 2005 08:31:04 -0000
> @@ -550,6 +550,7 @@
>
> if (e & VO_EVENT_RESIZE)
> {
> + panscan_calc();
> XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY, &vo_dwidth,
> &vo_dheight, &drwBorderWidth, &drwDepth);
> drwX = drwY = 0;
> @@ -939,6 +942,7 @@
> case VOCTRL_FULLSCREEN:
> vo_x11_fullscreen();
> /* indended, fallthrough to update panscan on fullscreen/windowed switch */
> + return VO_TRUE;
I will also remove the comment above when commiting this.
Alex (beastd)
More information about the MPlayer-dev-eng
mailing list