Mercurial > mplayer.hg
comparison libvo/vo_gl2.c @ 7763:cdb43addad4c
-fixed-vo support
author | pontscho |
---|---|
date | Wed, 16 Oct 2002 21:32:03 +0000 |
parents | eca7dbad0166 |
children | 48c71b6c7389 |
comparison
equal
deleted
inserted
replaced
7762:d676c2a86b9e | 7763:cdb43addad4c |
---|---|
667 xswa.background_pixel = 0; | 667 xswa.background_pixel = 0; |
668 xswa.border_pixel = 1; | 668 xswa.border_pixel = 1; |
669 xswa.colormap = XCreateColormap(mDisplay, mRootWin, vinfo->visual, AllocNone); | 669 xswa.colormap = XCreateColormap(mDisplay, mRootWin, vinfo->visual, AllocNone); |
670 xswamask = CWBackPixel | CWBorderPixel | CWColormap; | 670 xswamask = CWBackPixel | CWBorderPixel | CWColormap; |
671 | 671 |
672 vo_window = XCreateWindow(mDisplay, RootWindow(mDisplay,mScreen), | 672 if ( vo_window == None ) |
673 hint.x, hint.y, hint.width, hint.height, 4, vinfo->depth,CopyFromParent,vinfo->visual,xswamask,&xswa); | 673 { |
674 | 674 vo_window = XCreateWindow(mDisplay, RootWindow(mDisplay,mScreen), hint.x, hint.y, hint.width, hint.height, 4, vinfo->depth,CopyFromParent,vinfo->visual,xswamask,&xswa); |
675 vo_x11_classhint( mDisplay,vo_window,"gl2" ); | |
676 vo_hidecursor(mDisplay,vo_window); | |
677 | |
678 wsGLXContext=glXCreateContext( mDisplay,vinfo,NULL,True ); | |
679 | 675 |
680 if ( flags&0x01 ) vo_x11_decoration( mDisplay,vo_window,0 ); | 676 if ( flags&0x01 ) vo_x11_decoration( mDisplay,vo_window,0 ); |
681 | 677 |
682 XSelectInput(mDisplay, vo_window, StructureNotifyMask); | 678 XSelectInput(mDisplay, vo_window, StructureNotifyMask); |
683 | 679 |
684 /* Tell other applications about this window */ | 680 /* Tell other applications about this window */ |
685 | 681 |
686 XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); | 682 XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); |
687 | 683 |
688 /* Map window. */ | 684 /* Map window. */ |
689 | |
690 XMapWindow(mDisplay, vo_window); | 685 XMapWindow(mDisplay, vo_window); |
691 #ifdef HAVE_XINERAMA | 686 #ifdef HAVE_XINERAMA |
692 vo_x11_xinerama_move(mDisplay,vo_window); | 687 vo_x11_xinerama_move(mDisplay,vo_window); |
693 #endif | 688 #endif |
694 XClearWindow(mDisplay,vo_window); | 689 XClearWindow(mDisplay,vo_window); |
700 } | 695 } |
701 while (xev.type != MapNotify || xev.xmap.event != vo_window); | 696 while (xev.type != MapNotify || xev.xmap.event != vo_window); |
702 | 697 |
703 XSelectInput(mDisplay, vo_window, NoEventMask); | 698 XSelectInput(mDisplay, vo_window, NoEventMask); |
704 | 699 |
705 glXMakeCurrent( mDisplay,vo_window,wsGLXContext ); | 700 } |
701 else if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height ); | |
702 | |
703 vo_x11_classhint( mDisplay,vo_window,"gl2" ); | |
704 vo_hidecursor(mDisplay,vo_window); | |
705 | |
706 if ( vo_config_count ) glXDestroyContext( mDisplay,wsGLXContext ); | |
707 | |
708 wsGLXContext=glXCreateContext( mDisplay,vinfo,NULL,True ); | |
709 | |
710 glXMakeCurrent( mDisplay,vo_window,wsGLXContext ); | |
706 | 711 |
707 XFlush(mDisplay); | 712 XFlush(mDisplay); |
708 XSync(mDisplay, False); | 713 XSync(mDisplay, False); |
709 | 714 |
710 //XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!! | 715 //XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!! |