diff options
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 0a193fb0d3..0ad2a30dd9 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -1099,13 +1099,12 @@ void vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y, XSetStandardProperties(mDisplay, x11->window, title, title, None, NULL, 0, &hint); if (!vo_border) vo_x11_decoration(vo, 0); // map window - XMapWindow(mDisplay, x11->window); - vo_x11_clearwindow(vo, x11->window); XSelectInput(mDisplay, x11->window, NoEventMask); - XSync(mDisplay, False); vo_x11_selectinput_witherr(mDisplay, x11->window, StructureNotifyMask | KeyPressMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask); + XMapWindow(mDisplay, x11->window); + vo_x11_clearwindow(vo, x11->window); } if (opts->vo_ontop) vo_x11_setlayer(vo, x11->window, opts->vo_ontop); vo_x11_update_geometry(vo, !geometry_xy_changed); @@ -1129,18 +1128,17 @@ final: } void vo_x11_clearwindow_part(struct vo *vo, Window vo_window, - int img_width, int img_height, int use_fs) + int img_width, int img_height) { struct vo_x11_state *x11 = vo->x11; - struct MPOpts *opts = vo->opts; Display *mDisplay = vo->x11->display; int u_dheight, u_dwidth, left_ov, left_ov2; if (x11->f_gc == None) return; - u_dheight = use_fs ? opts->vo_screenheight : vo->dheight; - u_dwidth = use_fs ? opts->vo_screenwidth : vo->dwidth; + u_dheight = vo->dheight; + u_dwidth = vo->dwidth; if ((u_dheight <= img_height) && (u_dwidth <= img_width)) return; @@ -2302,7 +2300,6 @@ int vo_xv_init_colorkey(struct vo *vo) void vo_xv_draw_colorkey(struct vo *vo, int32_t x, int32_t y, int32_t w, int32_t h) { - struct MPOpts *opts = vo->opts; struct vo_x11_state *x11 = vo->x11; if( x11->xv_ck_info.method == CK_METHOD_MANUALFILL || x11->xv_ck_info.method == CK_METHOD_BACKGROUND )//less tearing than XClearWindow() @@ -2312,30 +2309,6 @@ void vo_xv_draw_colorkey(struct vo *vo, int32_t x, int32_t y, x, y, w, h ); } - - /* draw black bars if needed */ - /* TODO! move this to vo_x11_clearwindow_part() */ - if ( vo_fs ) - { - XSetForeground(x11->display, x11->vo_gc, 0 ); - /* making non-overlap fills, requires 8 checks instead of 4 */ - if ( y > 0 ) - XFillRectangle(x11->display, x11->window, x11->vo_gc, - 0, 0, - opts->vo_screenwidth, y); - if (x > 0) - XFillRectangle(x11->display, x11->window, x11->vo_gc, - 0, 0, - x, opts->vo_screenheight); - if (x + w < opts->vo_screenwidth) - XFillRectangle(x11->display, x11->window, x11->vo_gc, - x + w, 0, - opts->vo_screenwidth, opts->vo_screenheight); - if (y + h < opts->vo_screenheight) - XFillRectangle(x11->display, x11->window, x11->vo_gc, - 0, y + h, - opts->vo_screenwidth, opts->vo_screenheight); - } } /** \brief Tests if a valid argument for the ck suboption was given. */ |