changeset 8147:538f88a49b50

reversed wm order in vo_x11_setlayer + even upper layer for GNOME compliant wm's
author henry
date Mon, 11 Nov 2002 14:26:07 +0000
parents c34cfda2f07e
children 5b39e79af5fe
files libvo/x11_common.c
diffstat 1 files changed, 25 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/x11_common.c	Mon Nov 11 09:37:29 2002 +0000
+++ b/libvo/x11_common.c	Mon Nov 11 14:26:07 2002 +0000
@@ -629,7 +629,7 @@
 
 #define WIN_LAYER_ONBOTTOM               2
 #define WIN_LAYER_NORMAL                 4
-#define WIN_LAYER_ONTOP                  6
+#define WIN_LAYER_ONTOP                  10
 
 void vo_x11_setlayer( int layer )
 {
@@ -655,6 +655,30 @@
    return;
   }
 
+ type=XInternAtom( mDisplay,"_WIN_SUPPORTING_WM_CHECK",False );
+ if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char**)(&args) ) && nitems > 0 )
+  {
+   XClientMessageEvent  xev;
+   
+   mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Gnome style stay on top ( layer %d ).\n",layer );
+   memset( &xev,0,sizeof( xev ) );
+   xev.type=ClientMessage;
+   xev.window=vo_window;
+   xev.message_type=XInternAtom( mDisplay,"_WIN_LAYER",False );
+   xev.format=32;
+   switch ( layer ) 
+    {
+     case -1: xev.data.l[0] = WIN_LAYER_ONBOTTOM; break;
+     case  0: xev.data.l[0] = WIN_LAYER_NORMAL;   break;
+     case  1: xev.data.l[0] = WIN_LAYER_ONTOP;    break;
+    }
+   
+   if ( layer ) XRaiseWindow( mDisplay,vo_window );
+   XSendEvent( mDisplay,mRootWin,False,SubstructureNotifyMask,(XEvent*)&xev );
+								              
+   XFree( args );
+   return;
+  }
  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 )
   {
@@ -680,29 +704,6 @@
    XFree( args );
    return;
   }
- type=XInternAtom( mDisplay,"_WIN_SUPPORTING_WM_CHECK",False );
- if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char**)(&args) ) && nitems > 0 )
-  {
-   XClientMessageEvent  xev;
-   
-   mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Gnome style stay on top ( layer %d ).\n",layer );
-   memset( &xev,0,sizeof( xev ) );
-   xev.type=ClientMessage;
-   xev.window=vo_window;
-   xev.message_type=XInternAtom( mDisplay,"_WIN_LAYER",False );
-   xev.format=32;
-   switch ( layer ) 
-    {
-     case -1: xev.data.l[0] = WIN_LAYER_ONBOTTOM; break;
-     case  0: xev.data.l[0] = WIN_LAYER_NORMAL;   break;
-     case  1: xev.data.l[0] = WIN_LAYER_ONTOP;    break;
-    }
-   XSendEvent( mDisplay,mRootWin,False,SubstructureNotifyMask,(XEvent*)&xev );
-   if ( layer ) XRaiseWindow( mDisplay,vo_window );
-								              
-   XFree( args );
-   return;
-  }
 }
 
 void vo_x11_fullscreen( void )