Mercurial > mplayer.hg
comparison libvo/vo_x11.c @ 4808:4eaa205201b0
clear the window if resized but no scaling used. Enable runtime fullscreen selectin when no zooming available
author | alex |
---|---|
date | Fri, 22 Feb 2002 16:16:02 +0000 |
parents | 79b753e2e84a |
children | 15e95b9cf191 |
comparison
equal
deleted
inserted
replaced
4807:156482788caf | 4808:4eaa205201b0 |
---|---|
111 static int srcW=-1; | 111 static int srcW=-1; |
112 static int srcH=-1; | 112 static int srcH=-1; |
113 static int aspect; // 1<<16 based fixed point aspect, so that the aspect stays correct during resizing | 113 static int aspect; // 1<<16 based fixed point aspect, so that the aspect stays correct during resizing |
114 | 114 |
115 static void check_events(){ | 115 static void check_events(){ |
116 vo_x11_check_events(mDisplay); | 116 int ret = vo_x11_check_events(mDisplay); |
117 | |
118 /* clear the old window */ | |
119 if (ret & VO_EVENT_RESIZE) | |
120 { | |
121 XSetBackground(mDisplay, vo_gc, 0); | |
122 XClearWindow(mDisplay, vo_window); | |
123 } | |
117 } | 124 } |
118 | 125 |
119 static void draw_alpha_32(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){ | 126 static void draw_alpha_32(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){ |
120 vo_draw_alpha_rgb32(w,h,src,srca,stride,ImageData+4*(y0*image_width+x0),4*image_width); | 127 vo_draw_alpha_rgb32(w,h,src,srca,stride,ImageData+4*(y0*image_width+x0),4*image_width); |
121 } | 128 } |
595 case VOCTRL_QUERY_FORMAT: | 602 case VOCTRL_QUERY_FORMAT: |
596 return query_format(*((uint32_t*)data)); | 603 return query_format(*((uint32_t*)data)); |
597 case VOCTRL_GUISUPPORT: | 604 case VOCTRL_GUISUPPORT: |
598 return VO_TRUE; | 605 return VO_TRUE; |
599 case VOCTRL_FULLSCREEN: | 606 case VOCTRL_FULLSCREEN: |
600 if (!zoomFlag) | |
601 { | |
602 mp_msg(MSGT_VO, MSGL_WARN, "X11 Fullscreen: not available without zooming enabled\n"); | |
603 return VO_NOTAVAIL; | |
604 } | |
605 if ((vo_fs_oldwidth == -1) && (vo_fs_oldheight == -1)) | 607 if ((vo_fs_oldwidth == -1) && (vo_fs_oldheight == -1)) |
606 { | 608 { |
607 int foo; | 609 int foo; |
608 Window root; | 610 Window root; |
609 | 611 |