diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-29 21:08:10 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-29 21:08:10 +0000 |
commit | 1cb75ce96756400df3fb43535376880151e1c172 (patch) | |
tree | e49e52c5797891a302283e0c03d66e0781f71ebb /libvo/x11_common.c | |
parent | 91b38a8658369798e1eed2a371db2df5df7b7ba5 (diff) | |
download | mpv-1cb75ce96756400df3fb43535376880151e1c172.tar.bz2 mpv-1cb75ce96756400df3fb43535376880151e1c172.tar.xz |
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@pld.org.pl>
NOTE: we can still reverse it :))) --A'rpi
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8646 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 2afbb3d638..0052bf3eba 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -670,6 +670,29 @@ void vo_x11_setlayer( int layer ) { 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 ); |