# HG changeset patch # User reimar # Date 1226789321 0 # Node ID 88fad4f51a9487fdaa35b33aee8e964cfbaea491 # Parent 4115aa1e880ef8024cd381bc8fa0a2cd861ff442 respect -vf dsize etc. also for -rootwin, just like vo_xv does. diff -r 4115aa1e880e -r 88fad4f51a94 libvo/vo_x11.c --- a/libvo/vo_x11.c Sat Nov 15 22:34:41 2008 +0000 +++ b/libvo/vo_x11.c Sat Nov 15 22:48:41 2008 +0000 @@ -454,12 +454,6 @@ } getMyXImage(); - if (!WinID) - { - vo_dwidth = vo_screenwidth; - vo_dheight = vo_screenheight; - } - while (fmte->mpfmt) { int depth = IMGFMT_RGB_DEPTH(fmte->mpfmt); /* bits_per_pixel in X seems to be set to 16 for 15 bit formats @@ -529,22 +523,26 @@ static void Display_Image(XImage * myximage, uint8_t * ImageData) { + int x = (vo_dwidth - dst_width) / 2; + int y = (vo_dheight - myximage->height) / 2; + if (WinID == 0) { + x = vo_dx; + y = vo_dy; + } myximage->data += out_offset; #ifdef HAVE_SHM if (Shmem_Flag) { XShmPutImage(mDisplay, vo_window, vo_gc, myximage, 0, 0, - (vo_dwidth - dst_width) / 2, - (vo_dheight - myximage->height) / 2, dst_width, + x, y, dst_width, myximage->height, True); } else #endif { XPutImage(mDisplay, vo_window, vo_gc, myximage, 0, 0, - (vo_dwidth - dst_width) / 2, - (vo_dheight - myximage->height) / 2, dst_width, + x, y, dst_width, myximage->height); } myximage->data -= out_offset;