CVS: main/libvo vo_gl2.c,1.37,1.38
Update of /cvsroot/mplayer/main/libvo In directory mail:/var/tmp.root/cvs-serv18554 Modified Files: vo_gl2.c Log Message: * clear window on fullscreen switch * add call of vo_x11_sizehint Index: vo_gl2.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- vo_gl2.c 4 Oct 2003 17:29:04 -0000 1.37 +++ vo_gl2.c 12 Oct 2003 14:42:27 -0000 1.38 @@ -11,6 +11,7 @@ #include <errno.h> #include "config.h" +#include "mp_msg.h" #include "video_out.h" #include "video_out_internal.h" #include "sub.h" @@ -562,15 +563,16 @@ } -static void resize(int x,int y){ - printf("[gl2] Resize: %dx%d\n",x,y); +static void resize(int *x,int *y){ + mp_msg(MSGT_VO,MSGL_V,"[gl2] Resize: %dx%d\n",*x,*y); if( vo_fs ) { - aspect(&x, &y, A_ZOOM); - glViewport( (vo_screenwidth-x)/2, (vo_screenheight-y)/2, x, y); + glClear(GL_COLOR_BUFFER_BIT); + aspect(x, y, A_ZOOM); + glViewport( (vo_screenwidth-*x)/2, (vo_screenheight-*y)/2, *x, *y); } else { - aspect(&x, &y, A_NOZOOM); - glViewport( 0, 0, x, y ); + //aspect(x, y, A_NOZOOM); + glViewport( 0, 0, *x, *y ); } glMatrixMode(GL_PROJECTION); @@ -732,6 +734,7 @@ #ifdef HAVE_XINERAMA vo_x11_xinerama_move(mDisplay,vo_window); #endif + vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); XClearWindow(mDisplay,vo_window); /* Wait for map. */ @@ -744,7 +747,10 @@ XSelectInput(mDisplay, vo_window, NoEventMask); } - else if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height ); + else { + vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); + if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height ); + } vo_x11_classhint( mDisplay,vo_window,"gl2" ); vo_hidecursor(mDisplay,vo_window); @@ -823,7 +829,7 @@ gl_bitmap_format_s, gl_bitmap_type_s, gl_alignment, rgb_sz, r_sz, g_sz, b_sz, a_sz, gl_internal_format_s); - resize(d_width, d_height); + resize(&d_width, &d_height); glClearColor( 0.0f,0.0f,0.0f,0.0f ); glClear( GL_COLOR_BUFFER_BIT ); @@ -1024,7 +1030,7 @@ static void check_events(void) { int e=vo_w32_check_events(); - if(e&VO_EVENT_RESIZE) resize(vo_dwidth,vo_dheight); + if(e&VO_EVENT_RESIZE) resize(&vo_dwidth, &vo_dheight); if(e&VO_EVENT_EXPOSE && int_pause) flip_page(); } @@ -1057,7 +1063,7 @@ } } e=vo_x11_check_events(mDisplay); - if(e&VO_EVENT_RESIZE) resize(vo_dwidth,vo_dheight); + if(e&VO_EVENT_RESIZE) resize(&vo_dwidth, &vo_dheight); if(e&VO_EVENT_EXPOSE && int_pause) flip_page(); }
participants (3)
-
Attila Kinali -
Attila Kinali CVS -
Felix Buenemann