[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.152,1.153 x11_common.h,1.31,1.32

Alex Beregszaszi alex at mplayerhq.hu
Mon Sep 1 01:13:53 CEST 2003


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

Modified Files:
	x11_common.c x11_common.h 
Log Message:
10000l. Never ever use such foolish GCC 3.x extensionscvs diff -u x11_common.c x11_common.h |more

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- x11_common.c	31 Aug 2003 22:27:10 -0000	1.152
+++ x11_common.c	31 Aug 2003 23:13:45 -0000	1.153
@@ -816,10 +816,9 @@
 //
 Window vo_x11_create_smooth_window( Display *mDisplay, Window mRoot, Visual *vis, int x, int y, unsigned int width, unsigned int height, int depth, Colormap col_map)
 {
-   unsigned long xswamask;
+   unsigned long xswamask = CWBackingStore | CWBorderPixel;
    XSetWindowAttributes xswa;
-   
-   xswamask=CWBackingStore | CWBorderPixel;
+   Window ret_win;
    
    if (col_map!=CopyFromParent)
    {
@@ -831,7 +830,7 @@
    xswa.backing_store = Always;
    xswa.bit_gravity = StaticGravity;
    
-   Window ret_win = XCreateWindow(mDisplay, mRootWin, x, y, width, height, 0, depth,
+   ret_win = XCreateWindow(mDisplay, mRootWin, x, y, width, height, 0, depth,
 		        CopyFromParent, vis, xswamask , &xswa);
    if (!f_gc) f_gc=XCreateGC (mDisplay, ret_win, 0, 0);
    XSetForeground (mDisplay, f_gc, 0);
@@ -840,24 +839,26 @@
 }
 	
 
-void vo_x11_clearwindow_part( Display *mDisplay, Window vo_window, int img_wid, int img_hei, int use_fs)
+void vo_x11_clearwindow_part(Display *mDisplay, Window vo_window, int img_width, int img_height, int use_fs)
 {
+   int u_dheight, u_dwidth, left_ov, left_ov2;
+
    if (!f_gc) return;
-   int u_dheight = use_fs?vo_screenheight:vo_dheight;
-   int u_dwidth = use_fs?vo_screenwidth:vo_dwidth;
-   
-   if (u_dheight<=img_hei && u_dwidth<=img_wid) return;
 
-   int left_ov = (u_dheight - img_hei)/2;
-   int left_ov2 = (u_dwidth - img_wid)/2;   
+   u_dheight = use_fs?vo_screenheight:vo_dheight;
+   u_dwidth = use_fs?vo_screenwidth:vo_dwidth;
+   if ((u_dheight<=img_height) && (u_dwidth<=img_width)) return;
+
+   left_ov = (u_dheight - img_height)/2;
+   left_ov2 = (u_dwidth - img_width)/2;   
    
    XFillRectangle(mDisplay, vo_window, f_gc, 0, 0, u_dwidth, left_ov);
    XFillRectangle(mDisplay, vo_window, f_gc, 0, u_dheight-left_ov-1, u_dwidth, left_ov+1);
    
-   if (u_dwidth>img_wid)
+   if (u_dwidth>img_width)
    {
-   XFillRectangle(mDisplay, vo_window, f_gc, 0, left_ov, left_ov2, img_hei);
-   XFillRectangle(mDisplay, vo_window, f_gc, u_dwidth-left_ov2-1, left_ov, left_ov2, img_hei);
+   XFillRectangle(mDisplay, vo_window, f_gc, 0, left_ov, left_ov2, img_height);
+   XFillRectangle(mDisplay, vo_window, f_gc, u_dwidth-left_ov2-1, left_ov, left_ov2, img_height);
    }
 
    XFlush(mDisplay);

Index: x11_common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- x11_common.h	1 Jul 2003 21:37:20 -0000	1.31
+++ x11_common.h	31 Aug 2003 23:13:45 -0000	1.32
@@ -54,6 +54,11 @@
 extern uint32_t vo_x11_set_equalizer(char *name, int value);
 extern uint32_t vo_x11_get_equalizer(char *name, int *value);
 extern void fstype_help(void);
+extern Window vo_x11_create_smooth_window( Display *mDisplay, Window mRoot,
+	Visual *vis, int x, int y, unsigned int width, unsigned int height,
+	int depth, Colormap col_map);
+extern void vo_x11_clearwindow_part(Display *mDisplay, Window vo_window,
+	int img_width, int img_height, int use_fs);
 
 #endif
 



More information about the MPlayer-cvslog mailing list