[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.133,1.134 x11_common.h,1.28,1.29

Zoltan Ponekker pontscho at mplayerhq.hu
Thu Jan 9 21:47:17 CET 2003


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv31571/libvo

Modified Files:
	x11_common.c x11_common.h 
Log Message:


- sync with x11_common
- half rewrited font render engine (disabled by default)



Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -r1.133 -r1.134
--- x11_common.c	7 Jan 2003 20:58:25 -0000	1.133
+++ x11_common.c	9 Jan 2003 20:47:14 -0000	1.134
@@ -41,10 +41,6 @@
 #include "../mplayer.h"
 #endif
 
-#define vo_wm_Unknown     0
-#define vo_wm_NetWM       1
-#define vo_wm_Layered     2
-
 #define WIN_LAYER_ONBOTTOM               2
 #define WIN_LAYER_NORMAL                 4
 #define WIN_LAYER_ONTOP                  6
@@ -72,10 +68,6 @@
 /* if equal to 1 means that WM is a metacity (broken as hell) */
 int metacity_hack = 0;
 
-#define SUPPORT_NONE 0
-#define SUPPORT_FULLSCREEN 1
-#define SUPPORT_ABOVE 2
-#define SUPPORT_STAYS_ON_TOP 4
 int net_wm_support = 0;
 
 Atom XA_NET_SUPPORTED;
@@ -701,10 +693,13 @@
  XSetWMNormalHints( mDisplay,vo_window,&vo_hint );
 }
 
-void vo_x11_setlayer( int layer )
+void vo_x11_setlayer( Display * mDisplay,Window vo_window,int layer )
 {
  if ( WinID >= 0 ) return;
- 
+
+ // window manager could be changed during play
+ vo_wm_type=vo_wm_detect();
+
  switch ( vo_wm_type )
  { case vo_wm_Layered:
   {
@@ -718,6 +713,7 @@
     xev.data.l[0] = layer?ice_layer:WIN_LAYER_NORMAL; // if not fullscreen, stay on layer "Normal"
     xev.data.l[1] = CurrentTime;
     mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Layered style stay on top ( layer %d ).\n",xev.data.l[0] );
+    printf( "[x11] Layered style stay on top ( layer %d ).\n",xev.data.l[0] );
     XSendEvent(mDisplay, mRootWin, False, SubstructureNotifyMask, (XEvent *) &xev);
     break;
   }
@@ -751,6 +747,7 @@
    }
    state = XGetAtomName (mDisplay, xev.data.l[1]);
    mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] NET style stay on top ( layer %d ). Using state %s.\n",layer,state );
+   printf( "[x11] NET style stay on top ( layer %d ). Using state %s.\n",layer,state );
    XFree (state);
   }
  }
@@ -784,7 +781,7 @@
    vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 0 : 1 );
    vo_x11_sizehint( x,y,w,h,0 );
  }
- vo_x11_setlayer( vo_fs );
+ vo_x11_setlayer( mDisplay,vo_window,vo_fs );
  if (net_wm_support!=SUPPORT_FULLSCREEN || metacity_hack==1)
  {
    if(vo_wm_type==vo_wm_Unknown && !(vo_fsmode&16))

Index: x11_common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- x11_common.h	29 Oct 2002 20:27:47 -0000	1.28
+++ x11_common.h	9 Jan 2003 20:47:14 -0000	1.29
@@ -7,6 +7,19 @@
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
+#define vo_wm_Unknown   0
+#define vo_wm_NetWM	1
+#define vo_wm_Layered	2
+
+#define SUPPORT_NONE 0
+#define SUPPORT_FULLSCREEN 1
+#define SUPPORT_ABOVE 2
+#define SUPPORT_STAYS_ON_TOP 4
+
+extern int net_wm_support;
+extern int metacity_hack;
+extern int vo_fsmode;
+
 extern int vo_depthonscreen;
 extern int vo_screenwidth;
 extern int vo_screenheight;
@@ -35,6 +48,7 @@
 extern int vo_x11_check_events(Display *mydisplay);
 extern void vo_x11_selectinput_witherr(Display *display, Window w, long event_mask);
 extern void vo_x11_fullscreen( void );
+extern void vo_x11_setlayer( Display * mDisplay,Window vo_window,int layer );
 extern void vo_x11_uninit();
 extern Colormap vo_x11_create_colormap(XVisualInfo *vinfo);
 extern uint32_t vo_x11_set_equalizer(char *name, int value);
@@ -63,6 +77,7 @@
 void vo_vm_close(Display*);
 #endif
 
+int vo_find_depth_from_visuals(Display *dpy, int screen, Visual **visual_return);
+
 #endif
 
-int vo_find_depth_from_visuals(Display *dpy, int screen, Visual **visual_return);



More information about the MPlayer-cvslog mailing list