summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-30 23:59:53 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-30 23:59:53 +0000
commit80bbae872094c4d39e402f67bf1da1804893554a (patch)
tree9f1017ade3859e603ab32237f82d9099e5bc6000 /libvo
parentc22eec60520d0520648b0e2eb845e8a9d7eae0a2 (diff)
downloadmpv-80bbae872094c4d39e402f67bf1da1804893554a.tar.bz2
mpv-80bbae872094c4d39e402f67bf1da1804893554a.tar.xz
This time the patch is fixing much more that breaking :-)
It includes ugly hack for OpenBox, swaps checking for netwm with layers (and makes fvwm work -> they have also broken _NET_WM_STATE_FULLSCREEN but also supports layers) and changes back fullscreen layer to 10, afterstep doesn't like 12 :-) Tested with: sawfish, metacity, kwin, blackbox, openbox, waimea, windowmaker, afterstep, icewm, mwm, fvwm Filip Kalinski <filon@pld.org.pl> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8670 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/x11_common.c43
1 files changed, 31 insertions, 12 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index cbf0d55f7e..6016ba4ed8 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -48,7 +48,7 @@
#define WIN_LAYER_ONBOTTOM 2
#define WIN_LAYER_NORMAL 4
#define WIN_LAYER_ONTOP 6
-#define WIN_LAYER_ABOVE_DOCK 12
+#define WIN_LAYER_ABOVE_DOCK 10
int ice_layer=WIN_LAYER_ABOVE_DOCK;
int stop_xscreensaver=0;
@@ -158,6 +158,20 @@ int vo_wm_detect( void )
if ( WinID >= 0 ) return vo_wm_Unknown;
+// -- supports layers
+ type=XInternAtom( mDisplay,"_WIN_PROTOCOLS",False );
+ if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char **) &args ) && nitems > 0 )
+ {
+ mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Detected wm supports layers.\n" );
+ for (i = 0; i < nitems; i++)
+ if (!strcmp( XGetAtomName (mDisplay, args[i]), "_WIN_LAYER"))
+ {
+ XFree( args );
+ return vo_wm_Layered;
+ }
+ XFree( args );
+ }
+
// --- netwm
type=XInternAtom( mDisplay,"_NET_SUPPORTED",False );
if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char **) &args ) && nitems > 0 )
@@ -167,20 +181,25 @@ int vo_wm_detect( void )
net_wm_support |= net_wm_support_state_test (XGetAtomName (mDisplay, args[i]));
XFree( args );
if (net_wm_support)
+ {
+ // ugly hack for broken OpenBox _NET_WM_STATE_FULLSCREEN support
+ // (in their implementation it only changes internal state of window, nothing more!!!)
+ if (vo_wm_NetWM == SUPPORT_FULLSCREEN)
+ {
+ type=XInternAtom( mDisplay,"_BLACKBOX_PID",False );
+ if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char **) &args ) && nitems > 0 )
+ {
+ mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Detected wm is a broken OpenBox.\n" );
+ net_wm_support=0;
+ XFree( args );
+ return vo_wm_Unknown;
+ }
+ XFree (args);
+ }
return vo_wm_NetWM;
+ }
}
-// -- supports layers
- type=XInternAtom( mDisplay,"_WIN_PROTOCOLS",False );
- if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char **) &args ) && nitems > 0 )
- {
- mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Detected wm supports layers.\n" );
- for (i = 0; i < nitems; i++)
- if (!strcmp( XGetAtomName (mDisplay, args[i]), "_WIN_LAYER"));
- return vo_wm_Layered;
- XFree( args );
- }
-
if ( wm == vo_wm_Unknown ) mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Unknown wm type...\n" );
return wm;
}