[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.118,1.119

Arpi of Ize arpi at mplayerhq.hu
Sun Dec 29 22:08:13 CET 2002


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

Modified Files:
	x11_common.c 
Log Message:
That patch fixes fullscreen on sawfish 1.2.
After applying fullscreen (x11, xv +/- gui) works with at least:
- sawfish 1.2
- metacity
- kwin
- wmaker
- balckbox
- waimea
- icewm,
so I think it doesn't break anything.

Filip Kalinski <filon at pld.org.pl>

NOTE: we can still reverse it :))) --A'rpi


Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- x11_common.c	14 Dec 2002 11:14:37 -0000	1.118
+++ x11_common.c	29 Dec 2002 21:08:10 -0000	1.119
@@ -670,6 +670,29 @@
   {
    XClientMessageEvent  xev;
    mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] NET style stay on top ( layer %d ).\n",layer );
+
+   memset( &xev,0,sizeof( xev ) );
+   xev.type=ClientMessage;
+   xev.message_type=XInternAtom( mDisplay,"_NET_WM_STATE",False );
+   xev.display=mDisplay;
+   xev.window=vo_window;
+   xev.format=32;
+   xev.data.l[0]=layer;
+   xev.data.l[1]=XInternAtom( mDisplay,"_NET_WM_STATE_FULLSCREEN",False );
+   XSendEvent( mDisplay,mRootWin,False,SubstructureRedirectMask,(XEvent*)&xev );
+   XFree( args );
+   
+   type=XInternAtom( mDisplay,"_NET_WM_STATE",False );
+   arg1=XInternAtom( mDisplay,"_NET_WM_STATE_FULLSCREEN",False );
+   if ( Success == XGetWindowProperty( mDisplay,vo_window,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char**)(&args) ) && nitems > 0 && format == 32) {
+       for (i = 0; i < nitems; i++) {
+	   if (((Atom)args[i] == arg1)) {
+	       XFree( args );
+	       return;
+	   }
+       }
+   }
+   
    memset( &xev,0,sizeof( xev ) );
    xev.type=ClientMessage;
    xev.message_type=XInternAtom( mDisplay,"_NET_WM_STATE",False );




More information about the MPlayer-cvslog mailing list