Mercurial > mplayer.hg
comparison libvo/vo_x11.c @ 6059:c0ae8c0eda72
fix Arpi's bugs
author | pontscho |
---|---|
date | Sun, 12 May 2002 16:01:08 +0000 |
parents | a4705acc43e5 |
children | 8460a0c0b44f |
comparison
equal
deleted
inserted
replaced
6058:f81923e3d084 | 6059:c0ae8c0eda72 |
---|---|
1 #define DISP | |
2 | 1 |
3 /* | 2 /* |
4 * video_out_x11.c,X11 interface | 3 * video_out_x11.c,X11 interface |
5 * | 4 * |
6 * | 5 * |
101 | 100 |
102 static void check_events(){ | 101 static void check_events(){ |
103 int ret = vo_x11_check_events(mDisplay); | 102 int ret = vo_x11_check_events(mDisplay); |
104 | 103 |
105 /* clear the old window */ | 104 /* clear the old window */ |
106 if (ret & VO_EVENT_RESIZE) | 105 if ( (ret & VO_EVENT_RESIZE)||(ret & VO_EVENT_EXPOSE) ) |
107 { | 106 { |
108 XSetBackground(mDisplay, vo_gc, 0); | 107 XSetBackground(mDisplay, vo_gc, 0); |
109 XClearWindow(mDisplay, vo_window); | 108 XClearWindow(mDisplay, vo_window); |
110 } | 109 } |
111 } | 110 } |
435 static const vo_info_t* get_info( void ) | 434 static const vo_info_t* get_info( void ) |
436 { return &vo_info; } | 435 { return &vo_info; } |
437 | 436 |
438 static void Display_Image( XImage *myximage,uint8_t *ImageData ) | 437 static void Display_Image( XImage *myximage,uint8_t *ImageData ) |
439 { | 438 { |
440 #ifdef DISP | |
441 #ifdef HAVE_SHM | 439 #ifdef HAVE_SHM |
442 if ( Shmem_Flag ) | 440 if ( Shmem_Flag ) |
443 { | 441 { |
444 XShmPutImage( mDisplay,vo_window,vo_gc,myximage, | 442 XShmPutImage( mDisplay,vo_window,vo_gc,myximage, |
445 0,0, | 443 0,0, |
452 XPutImage( mDisplay,vo_window,vo_gc,myximage, | 450 XPutImage( mDisplay,vo_window,vo_gc,myximage, |
453 0,0, | 451 0,0, |
454 ( vo_dwidth - swsContext->dstW ) / 2,( vo_dheight - myximage->height ) / 2, | 452 ( vo_dwidth - swsContext->dstW ) / 2,( vo_dheight - myximage->height ) / 2, |
455 swsContext->dstW,myximage->height); | 453 swsContext->dstW,myximage->height); |
456 } | 454 } |
457 #endif | |
458 } | 455 } |
459 | 456 |
460 static void draw_osd(void) | 457 static void draw_osd(void) |
461 { vo_draw_text(image_width,image_height,draw_alpha_fnc); } | 458 { vo_draw_text(image_width,image_height,draw_alpha_fnc); } |
462 | 459 |
467 | 464 |
468 static uint32_t draw_slice( uint8_t *src[],int stride[],int w,int h,int x,int y ) | 465 static uint32_t draw_slice( uint8_t *src[],int stride[],int w,int h,int x,int y ) |
469 { | 466 { |
470 uint8_t *dst[3]; | 467 uint8_t *dst[3]; |
471 int dstStride[3]; | 468 int dstStride[3]; |
469 | |
470 check_events(); | |
472 | 471 |
473 if((old_vo_dwidth != vo_dwidth || old_vo_dheight != vo_dheight) /*&& y==0*/ && zoomFlag) | 472 if((old_vo_dwidth != vo_dwidth || old_vo_dheight != vo_dheight) /*&& y==0*/ && zoomFlag) |
474 { | 473 { |
475 int newW= vo_dwidth; | 474 int newW= vo_dwidth; |
476 int newH= vo_dheight; | 475 int newH= vo_dheight; |