[MPlayer-cvslog] r27918 - trunk/libvo/vo_xv.c
Ivan Kalvachev
ikalvachev at gmail.com
Sun Nov 16 20:39:11 CET 2008
On 11/16/08, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> On Sun, Nov 16, 2008 at 07:32:42PM +0200, Ivan Kalvachev wrote:
>> On 11/15/08, reimar <subversion at mplayerhq.hu> wrote:
>> > Author: reimar
>> > Date: Sat Nov 15 18:41:30 2008
>> > New Revision: 27918
>> >
>> > Log:
>> > Remove a useless XGetGeometry call, the X11 event handling already takes
>> > care of this.
>> >
>> >
>> > Modified:
>> > trunk/libvo/vo_xv.c
>> >
>> > Modified: trunk/libvo/vo_xv.c
>> > ==============================================================================
>> > --- trunk/libvo/vo_xv.c (original)
>> > +++ trunk/libvo/vo_xv.c Sat Nov 15 18:41:30 2008
>> > @@ -462,11 +462,6 @@ static void check_events(void)
>> >
>> > if (e & VO_EVENT_RESIZE)
>> > {
>> > - XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY,
>> > &vo_dwidth,
>> > - &vo_dheight, &drwBorderWidth, &drwDepth);
>> > - mp_msg(MSGT_VO, MSGL_V, "[xv] dx: %d dy: %d dw: %d dh: %d\n",
>> > drwX,
>> > - drwY, vo_dwidth, vo_dheight);
>> > -
>> > calc_drwXY(&drwX, &drwY);
>> > }
>>
>> This doesn't looks right.
>> Would you please give more detailed explanation of these changes?
>> Do you mean that vo_x11_check_events() function handles this? I doubt
>> that.
>
> Yes, without the #if 0 stuff at that revision vo_x11_check_events
> contained:
> case ConfigureNotify:
> if (vo_window == None)
> break;
> vo_dwidth = Event.xconfigure.width;
> vo_dheight = Event.xconfigure.height;
> {
> Window root;
> int foo;
> Window win;
>
> XGetGeometry(mydisplay, vo_window, &root, &foo,
> &foo,
> &foo /*width */ , &foo /*height */ ,
> &foo,
> &foo);
> XTranslateCoordinates(mydisplay, vo_window, root, 0,
> 0,
> &vo_dx, &vo_dy, &win);
> }
> ret |= VO_EVENT_RESIZE;
> break;
>
>
> Note that from that XGetGeometry call, only the results in vo_dwidth
> and vo_dheight were actually ever used.
>From that call only "foo" would have been changed.
I think I've missed vo_dwidth/height that seems to be changed long before it.
Change ok, would you make it to xvmc too?
Just one final nitpick, maybe you can restore the mp_msg for debug purposes?
More information about the MPlayer-cvslog
mailing list