changeset 7572:f46967928779

_NET_WM_FULLSCREEN support
author pontscho
date Tue, 01 Oct 2002 14:37:01 +0000
parents 8819fdf88b5d
children 30e1c1f77737
files Gui/wm/ws.c libvo/x11_common.c
diffstat 2 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/wm/ws.c	Tue Oct 01 12:53:30 2002 +0000
+++ b/Gui/wm/ws.c	Tue Oct 01 14:37:01 2002 +0000
@@ -776,7 +776,7 @@
  Atom            type;
  int             format;
  unsigned long   nitems, bytesafter;
- unsigned char * args = NULL;
+ Atom          * args = NULL;
 
  if ( wsWMType == wsWMIceWM )
   {
@@ -794,15 +794,21 @@
  type=XInternAtom( wsDisplay,"_NET_SUPPORTED",False );
  if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( int32_t ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
   {
+   int    i;
    XEvent e;
+   
    e.xclient.type=ClientMessage;
    e.xclient.message_type=XInternAtom( wsDisplay,"_NET_WM_STATE",False );
    e.xclient.display=wsDisplay;
    e.xclient.window=win;
    e.xclient.format=32;
    e.xclient.data.l[0]=layer;
+   
    e.xclient.data.l[1]=XInternAtom( wsDisplay,"_NET_WM_STATE_STAYS_ON_TOP",False );
-//   e.xclient.data.l[1]=XInternAtom( wsDisplay,"_NET_WM_STATE_FULLSCREEN",False );
+   type=XInternAtom( wsDisplay,"_NET_WM_STATE_FULLSCREEN",False );
+   for ( i=0;i < nitems;i++ )
+    if ( args[i] == type ) { e.xclient.data.l[1]=XInternAtom( wsDisplay,"_NET_WM_STATE_FULLSCREEN",False ); break; }
+
    e.xclient.data.l[2]=0l;
    e.xclient.data.l[3]=0l;
    e.xclient.data.l[4]=0l;
--- a/libvo/x11_common.c	Tue Oct 01 12:53:30 2002 +0000
+++ b/libvo/x11_common.c	Tue Oct 01 14:37:01 2002 +0000
@@ -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 );