summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-31 23:13:45 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-31 23:13:45 +0000
commit7988f6bde60e8543673fc5198f9885c9dd521a87 (patch)
treec63a4ca21e52aa2ba50f0a230ffa07dfe11f2248 /libvo
parentb40642377a4aa093d3ec641d4fe86c6ad9033f44 (diff)
downloadmpv-7988f6bde60e8543673fc5198f9885c9dd521a87.tar.bz2
mpv-7988f6bde60e8543673fc5198f9885c9dd521a87.tar.xz
10000l. Never ever use such foolish GCC 3.x extensionscvs diff -u x11_common.c x11_common.h |more
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10766 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/x11_common.c29
-rw-r--r--libvo/x11_common.h5
2 files changed, 20 insertions, 14 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index d885e77e6d..a7194b617b 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -816,10 +816,9 @@ static int vo_x11_get_gnome_layer(Display * mDisplay, Window win)
//
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 @@ Window vo_x11_create_smooth_window( Display *mDisplay, Window mRoot, Visual *vis
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 @@ Window vo_x11_create_smooth_window( Display *mDisplay, Window mRoot, Visual *vis
}
-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);
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index f0f3efde11..f5ae98fc28 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -54,6 +54,11 @@ extern Colormap vo_x11_create_colormap(XVisualInfo *vinfo);
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