Mercurial > mplayer.hg
changeset 1775:e8a6425a1cde
fix gui support
author | pontscho |
---|---|
date | Thu, 30 Aug 2001 16:05:04 +0000 |
parents | 6ad9ce536cf9 |
children | 48e6351f5714 |
files | libvo/vo_xv.c |
diffstat | 1 files changed, 10 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_xv.c Thu Aug 30 13:44:27 2001 +0000 +++ b/libvo/vo_xv.c Thu Aug 30 16:05:04 2001 +0000 @@ -90,7 +90,7 @@ static uint32_t drwX,drwY,drwWidth,drwHeight,drwBorderWidth,drwDepth; static uint32_t drwcX,drwcY,dwidth,dheight,mFullscreen; -#ifdef HAVE_GUI +#ifdef HAVE_NEW_GUI static uint32_t mdwidth,mdheight; #endif @@ -135,13 +135,18 @@ image_width = width; image_format=format; +#ifdef HAVE_NEW_GUI + mdwidth=width; + mdheight=height; +#endif + mFullscreen=flags&1; dwidth=d_width; dheight=d_height; num_buffers=vo_doublebuffering?NUM_BUFFERS:1; if (!vo_init()) return -1; -#ifdef HAVE_GUI +#ifdef HAVE_NEW_GUI if ( vo_window == None ) { #endif @@ -174,25 +179,18 @@ XSetStandardProperties(mDisplay, mywindow, hello, hello, None, NULL, 0, &hint); if ( mFullscreen ) vo_x11_decoration( mDisplay,mywindow,0 ); XMapWindow(mDisplay, mywindow); + mygc = XCreateGC(mDisplay, mywindow, 0L, &xgcv); XFlush(mDisplay); XSync(mDisplay, False); -#ifdef HAVE_GUI +#ifdef HAVE_NEW_GUI } else { mywindow=vo_window; mygc=vo_gc; - if ( vo_screenwidth != d_width ) - { - XMoveWindow( mDisplay,mywindow,( vo_screenwidth - d_width ) / 2,( vo_screenheight - d_height ) / 2 ); - XResizeWindow( mDisplay,mywindow,d_width,d_height ); - } - else mFullscreen=1; } #endif - mygc = XCreateGC(mDisplay, mywindow, 0L, &xgcv); - xv_port = 0; if (Success == XvQueryExtension(mDisplay,&ver,&rel,&req,&ev,&err)) { @@ -309,7 +307,7 @@ XTranslateCoordinates( mDisplay,mywindow,mRoot,0,0,&drwcX,&drwcY,&mRoot ); printf( "[xv] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); - #ifdef HAVE_GUI + #ifdef HAVE_NEW_GUI if ( vo_window != None ) { mFullscreen=0;