changeset 6034:7570f4666c15

fullscreen -- round three -- icewm fullscreen fixed
author pontscho
date Thu, 09 May 2002 17:28:09 +0000
parents fea2bd7ba32a
children 2f1dc330d566
files Gui/wm/ws.c libvo/x11_common.c
diffstat 2 files changed, 31 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/wm/ws.c	Thu May 09 17:13:12 2002 +0000
+++ b/Gui/wm/ws.c	Thu May 09 17:28:09 2002 +0000
@@ -729,6 +729,19 @@
  unsigned long   nitems, bytesafter;
  unsigned char * args = NULL;
 
+ if ( wsWMType == wsWMIceWM )
+  {
+   switch ( layer )
+    {
+     case -1: layer=2; break; // WinLayerBelow
+     case  0: layer=4; break; // WinLayerNormal
+     case  1: layer=8; break; // WinLayerOnTop
+    }
+  XChangeProperty( wsDisplay,win,
+    XInternAtom( wsDisplay,"_WIN_LAYER",False ),XA_CARDINAL,32,PropModeReplace,(unsigned char *)&layer,1 );
+  return;
+ }
+					
  type=XInternAtom( wsDisplay,"_NET_SUPPORTED",False );
  if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( long ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
   {
@@ -814,7 +827,7 @@
  win->SizeHint.flags=PPosition | PSize | PWinGravity;// | PBaseSize;
  win->SizeHint.x=win->X;              win->SizeHint.y=win->Y;
  win->SizeHint.width=win->Width;      win->SizeHint.height=win->Height;
- win->SizeHint.base_width=win->Width; win->SizeHint.base_height=win->Height;
+// win->SizeHint.base_width=win->Width; win->SizeHint.base_height=win->Height;
  
  win->SizeHint.win_gravity=StaticGravity;
  if ( win->Property & wsMaxSize )
--- a/libvo/x11_common.c	Thu May 09 17:13:12 2002 +0000
+++ b/libvo/x11_common.c	Thu May 09 17:28:09 2002 +0000
@@ -673,7 +673,20 @@
  unsigned long   nitems, bytesafter;
  unsigned char * args = NULL;
 
- if ( vo_wm_type == vo_wm_IceWM ) return;
+ if ( WinID >= 0 ) return;
+ 
+ if ( vo_wm_type == vo_wm_IceWM )
+  {
+   switch ( layer )
+    {
+     case -1: layer=2; break; // WinLayerBelow
+     case  0: layer=4; break; // WinLayerNormal
+     case  1: layer=8; break; // WinLayerOnTop
+    }
+   XChangeProperty( mDisplay,vo_window,
+   XInternAtom( mDisplay,"_WIN_LAYER",False ),XA_CARDINAL,32,PropModeReplace,(unsigned char *)&layer,1 );
+   return;
+  }
 
  type=XInternAtom( mDisplay,"_NET_SUPPORTED",False );
  if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,65536 / sizeof( long ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
@@ -681,6 +694,7 @@
    XEvent e;
    
    mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] NET style stay on top ( layer %d ).\n",layer );
+   memset( &e,0,sizeof( e ) );
    e.xclient.type=ClientMessage;
    e.xclient.message_type=XInternAtom( mDisplay,"_NET_WM_STATE",False );
    e.xclient.display=mDisplay;
@@ -688,9 +702,6 @@
    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[2]=0l;
-   e.xclient.data.l[3]=0l;
-   e.xclient.data.l[4]=0l;
    XSendEvent( mDisplay,mRootWin,False,SubstructureRedirectMask,&e );
 								   
    XFree( args );
@@ -725,15 +736,14 @@
 {
  int x=0,y=0,w=vo_screenwidth,h=vo_screenheight;
 
+ if ( WinID >= 0 ) return;
+
  switch ( vo_wm_type )
   {
    case vo_wm_Unknown:
 	  vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 );
 	  XUnmapWindow( mDisplay,vo_window );
 	  break;
-   case vo_wm_IceWM:
-	  if ( !vo_fs ) XUnmapWindow( mDisplay,vo_window );
-	  break;
   }
 
  if ( vo_fs )