summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-01 23:46:34 +0200
committerwm4 <wm4@nowhere>2015-07-01 23:46:34 +0200
commit8dff03560adcc463ec6a74de78a3a503c7fcb084 (patch)
treed9973977b32517bf591cff7adfd0752da19ba900
parent89f05dc7d114d805cd4d9981615cbc0b0af35863 (diff)
downloadmpv-8dff03560adcc463ec6a74de78a3a503c7fcb084.tar.bz2
mpv-8dff03560adcc463ec6a74de78a3a503c7fcb084.tar.xz
x11: remove clear on map
Less code, and avoids a black flash on start. In theory it could happen that we map the window, and then don't have a frame to draw - but mapping the window is done in the exact moment we have a new frame to display.
-rw-r--r--video/out/x11_common.c11
-rw-r--r--video/out/x11_common.h1
2 files changed, 0 insertions, 12 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index ba893c30d9..026662404b 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1041,8 +1041,6 @@ int vo_x11_check_events(struct vo *vo)
get_mods(Event.xbutton.state) | MP_KEY_STATE_UP);
break;
case MapNotify:
- if (x11->window_hidden)
- vo_x11_clearwindow(vo, x11->window);
x11->window_hidden = false;
x11->pseudo_mapped = true;
vo_x11_update_geometry(vo);
@@ -1579,15 +1577,6 @@ void vo_x11_clear_background(struct vo *vo, const struct mp_rect *rc)
XFlush(x11->display);
}
-void vo_x11_clearwindow(struct vo *vo, Window vo_window)
-{
- struct vo_x11_state *x11 = vo->x11;
- if (x11->f_gc == None)
- return;
- XFillRectangle(x11->display, vo_window, x11->f_gc, 0, 0, INT_MAX, INT_MAX);
- XFlush(x11->display);
-}
-
static void vo_x11_setlayer(struct vo *vo, bool ontop)
{
struct vo_x11_state *x11 = vo->x11;
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index c8ed22b248..6dfcbf52f7 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -129,7 +129,6 @@ bool vo_x11_screen_is_composited(struct vo *vo);
void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis, int flags,
const char *classname);
void vo_x11_clear_background(struct vo *vo, const struct mp_rect *rc);
-void vo_x11_clearwindow(struct vo *vo, Window vo_window);
int vo_x11_control(struct vo *vo, int *events, int request, void *arg);
#endif /* MPLAYER_X11_COMMON_H */