changeset 10765:c8fb7e2690a3

10000l. Never ever use such foolish GCC 3.x extensionscvs diff -u x11_common.c x11_common.h |more
author alex
date Sun, 31 Aug 2003 23:13:45 +0000
parents 06ebe990fa92
children 57f5eb4d884f
files libvo/x11_common.c libvo/x11_common.h
diffstat 2 files changed, 20 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/x11_common.c	Sun Aug 31 23:07:28 2003 +0000
+++ b/libvo/x11_common.c	Sun Aug 31 23:13:45 2003 +0000
@@ -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);
--- a/libvo/x11_common.h	Sun Aug 31 23:07:28 2003 +0000
+++ b/libvo/x11_common.h	Sun Aug 31 23:13:45 2003 +0000
@@ -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