summaryrefslogtreecommitdiffstats
path: root/libvo/vo_x11.c
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-17 01:22:09 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-17 01:22:09 +0000
commit9e90ab54309dcdb720ef8a70e11db90b1ddb46f0 (patch)
treeca25178f2f9b6b95d78c487f2254ca750aa06f81 /libvo/vo_x11.c
parent255ab08f9d1ae90c541b9ccab12fa55cf3304f6a (diff)
downloadmpv-9e90ab54309dcdb720ef8a70e11db90b1ddb46f0.tar.bz2
mpv-9e90ab54309dcdb720ef8a70e11db90b1ddb46f0.tar.xz
patch: some X11 compliance fixed: set ClassHint and better fullscreen mode
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1138 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_x11.c')
-rw-r--r--libvo/vo_x11.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 82567ecab9..41ef08c857 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -117,6 +117,7 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
{
// int screen;
int fullscreen=0;
+ int vm=0;
// int interval, prefer_blank, allow_exp, nothing;
unsigned int fg,bg;
char *hello=( title == NULL ) ? "X11 render" : title;
@@ -141,11 +142,12 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
hint.width=image_width;
hint.height=image_height;
- if( flags&0x01 ) fullscreen = 1;
+ if( flags&0x03 ) fullscreen = 1;
+ if( flags&0x02 ) vm = 1;
if( flags&0x08 ) Flip_Flag = 1;
#ifdef HAVE_XF86VM
- if (fullscreen) {
+ if (vm) {
unsigned int modeline_width, modeline_height, vm_event, vm_error;
unsigned int vm_ver, vm_rev;
int i,j,have_vm=0,X,Y;
@@ -221,6 +223,7 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
hint.x,hint.y,
hint.width,hint.height,
xswa.border_pixel,depth,CopyFromParent,vinfo.visual,xswamask,&xswa );
+ vo_x11_classhint( mDisplay,mywindow,"x11" );
vo_hidecursor(mDisplay,mywindow);
if ( fullscreen ) vo_x11_decoration( mDisplay,mywindow,0 );
@@ -315,7 +318,7 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
bpp=myximage->bits_per_pixel;
- printf( "X11 color mask: R:%lX G:%lX B:%lX\n",myximage->red_mask,myximage->green_mask,myximage->blue_mask );
+// printf( "X11 color mask: R:%lX G:%lX B:%lX\n",myximage->red_mask,myximage->green_mask,myximage->blue_mask );
// If we have blue in the lowest bit then obviously RGB
mode=( ( myximage->blue_mask & 0x01 ) != 0 ) ? MODE_RGB : MODE_BGR;
@@ -325,8 +328,9 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
if ( myximage->byte_order != LSBFirst )
#endif
{
- printf( "No support fon non-native XImage byte order!\n" );
- return -1;
+ mode=( ( myximage->blue_mask & 0x01 ) != 0 ) ? MODE_BGR : MODE_RGB;
+// printf( "No support fon non-native XImage byte order!\n" );
+// return -1;
}
if( format==IMGFMT_YV12 ) yuv2rgb_init( ( depth == 24 ) ? bpp : depth,mode );