[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.101,1.102

Zoltan Ponekker pontscho at mplayerhq.hu
Tue Oct 1 16:37:03 CEST 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv3724/libvo

Modified Files:
	x11_common.c 
Log Message:
_NET_WM_FULLSCREEN support

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- x11_common.c	29 Sep 2002 04:18:53 -0000	1.101
+++ x11_common.c	1 Oct 2002 14:36:48 -0000	1.102
@@ -635,7 +635,7 @@
  Atom            type;
  int             format;
  unsigned long   nitems, bytesafter;
- unsigned char * args = NULL;
+ Atom          * args = NULL;
 
  if ( WinID >= 0 ) return;
  
@@ -658,6 +658,7 @@
  if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
   {
    XEvent e;
+   int    i;
    
    mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] NET style stay on top ( layer %d ).\n",layer );
    memset( &e,0,sizeof( e ) );
@@ -667,8 +668,12 @@
    e.xclient.window=vo_window;
    e.xclient.format=32;
    e.xclient.data.l[0]=layer;
+
    e.xclient.data.l[1]=XInternAtom( mDisplay,"_NET_WM_STATE_STAYS_ON_TOP",False );
-//   e.xclient.data.l[1]=XInternAtom( mDisplay,"_NET_WM_STATE_FULLSCREEN",False );
+   type=XInternAtom( mDisplay,"_NET_WM_STATE_FULLSCREEN",False );
+   for ( i=0;i < nitems;i++ )
+     if ( args[i] == type ) { e.xclient.data.l[1]=XInternAtom( mDisplay,"_NET_WM_STATE_FULLSCREEN",False ); break; }
+
    XSendEvent( mDisplay,mRootWin,False,SubstructureRedirectMask,&e );
 								   
    XFree( args );




More information about the MPlayer-cvslog mailing list