[Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.33,1.34

Zoltan Ponekker pontscho at mplayerhq.hu
Tue Apr 30 00:00:52 CEST 2002


Update of /cvsroot/mplayer/main/Gui/wm
In directory mail:/var/tmp.root/cvs-serv19770/Gui/wm

Modified Files:
	ws.c 
Log Message:
fix fullscreen bug es ilyen libvo not initialized bug with gui igy

Index: ws.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/ws.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- ws.c	10 Mar 2002 23:05:44 -0000	1.33
+++ ws.c	29 Apr 2002 22:00:49 -0000	1.34
@@ -50,6 +50,7 @@
 Window               wsRootWin;
 XEvent               wsEvent;
 int                  wsWindowDepth;
+int		     wsWMType = 1;
 GC                   wsHGC;
 MotifWmHints         wsMotifWmHints;
 Atom                 wsTextProperlyAtom = None;
@@ -337,6 +338,7 @@
  win->AtomWMSizeHint=XInternAtom( wsDisplay,"WM_SIZE_HINT",False );
  win->AtomWMNormalHint=XInternAtom( wsDisplay,"WM_NORMAL_HINT",False );
  win->AtomProtocols=XInternAtom( wsDisplay,"WM_PROTOCOLS",False );
+#if 0
  {
   char buf[32]; int i;
   sprintf( buf,"_%s_REMOTE",label );
@@ -347,6 +349,7 @@
   fprintf( stderr,"[ws] atomname: %s\n",buf );
   win->AtomRemote=XInternAtom( wsDisplay,buf,False );
  }
+#endif
  win->AtomsProtocols[0]=win->AtomDeleteWindow;
  win->AtomsProtocols[1]=win->AtomTakeFocus;
  win->AtomsProtocols[2]=win->AtomRolle;
@@ -442,10 +445,12 @@
  wsTextProperty.nitems=strlen( label );
  XSetWMIconName( wsDisplay,win->WindowID,&wsTextProperty );
 
+#if 0
  XChangeProperty( wsDisplay,win->WindowID,
                   win->AtomRemote,XA_STRING,
                   8,PropModeReplace,
                   "REALIZED",8 );
+#endif
 
 //  win->Font=XLoadQueryFont( wsDisplay,"-adobe-helvetica-bold-r-normal--14-140-75-75-p-77-iso8859-1" );
 //  -adobe-times-medium-r-normal--14-140-75-75-p-77-iso8859-1" );
@@ -647,10 +652,20 @@
 //        break;
 
    case PropertyNotify:
-//      break;
-//      #ifdef DEBUG
-//         fprintf(stderr,"[ws] PropertyNotify ( 0x%x ) %s ( 0x%x )\n",wsWindowList[l]->WindowID,XGetAtomName( wsDisplay,Event->xproperty.atom ),Event->xproperty.atom );
-//      #endif
+	{
+	 char * name = XGetAtomName( wsDisplay,Event->xproperty.atom );
+	 
+         if ( !name ) break;
+	 if ( !strncmp( name,"_ICEWM_TRAY",11 ) ||
+	      !strncmp( name,"_KDE_",5 ) ||
+	      !strncmp( name,"KWM_WIN_DESKTOP",15 ) ) wsWMType=0;
+							  
+//         fprintf(stderr,"[ws] PropertyNotify %s ( 0x%x )\n",name,Event->xproperty.atom );
+							  
+	 XFree( name );
+	 break;
+	}
+#if 0
         if ( Event->xproperty.atom == wsWindowList[l]->AtomRemote )
          {
           Atom            type;
@@ -677,6 +692,7 @@
             XFree( args );
            }
          }
+#endif
         break;
 
   }
@@ -741,8 +757,7 @@
 void wsFullScreen( wsTWindow * win )
 {
  int decoration = 0;
- XUnmapWindow( wsDisplay,win->WindowID );
- win->SizeHint.flags=0;
+ if ( wsWMType ) XUnmapWindow( wsDisplay,win->WindowID );
  if ( win->isFullScreen )
   {
    win->X=win->OldX;
@@ -763,11 +778,11 @@
     wsScreenSaverOff( wsDisplay );
    }
 
- win->SizeHint.flags|=PPosition | PSize;
- win->SizeHint.x=win->X;
- win->SizeHint.y=win->Y;
- win->SizeHint.width=win->Width;
- win->SizeHint.height=win->Height;
+ 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.win_gravity=StaticGravity;
  if ( win->Property & wsMaxSize )
   {
    win->SizeHint.flags|=PMaxSize;
@@ -784,8 +799,8 @@
 
  XMoveResizeWindow( wsDisplay,win->WindowID,win->X,win->Y,win->Width,win->Height );
  wsWindowDecoration( win,decoration );
+ XMapRaised( wsDisplay,win->WindowID );
  XRaiseWindow( wsDisplay,win->WindowID );
- XMapWindow( wsDisplay,win->WindowID );
 }
 
 // ----------------------------------------------------------------------------------------------




More information about the MPlayer-cvslog mailing list