summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-09-30 23:31:34 +0200
committerwm4 <wm4@nowhere>2015-09-30 23:31:34 +0200
commit7c5f41ff5f00a823f4c75b7d9799729a05f943c9 (patch)
treefddccdae40ceacd75e886d5c665ad1bb34d2d746 /video/out/x11_common.h
parenta2a2cdb5bc7788012d3976a4d2f3650e58f9f466 (diff)
downloadmpv-7c5f41ff5f00a823f4c75b7d9799729a05f943c9.tar.bz2
mpv-7c5f41ff5f00a823f4c75b7d9799729a05f943c9.tar.xz
x11: separate window creation and configuration
This gets rid of an old hack, VOFLAG_HIDDEN. Although handling of it has been sane for a while, it used to cause much pain, and is still unintuitive and weird even today. The main reason for this hack is that OpenGL selects a X11 Visual for you, and you're supposed to use this Visual when creating the X window for the OpenGL context. Which means the X window can't be created early in the common X11 init code, but the OpenGL code needs to do something before that. API-wise you need separate functions for X11 init and X11 window creation. The VOFLAG_HIDDEN hack conflated window creation and the entrypoint for resizing on video resolution change into one function, vo_x11_config_vo_window(). This required all platform backends to handle this flag, even if they didn't need this mechanism. Wayland still uses this for minor reasons (alpha support?), so the wayland backend must be changed before the flag can be entirely removed.
Diffstat (limited to 'video/out/x11_common.h')
-rw-r--r--video/out/x11_common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index 50892cf26a..a25b8e2cca 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -125,8 +125,9 @@ int vo_x11_init(struct vo *vo);
void vo_x11_uninit(struct vo *vo);
int vo_x11_check_events(struct vo *vo);
bool vo_x11_screen_is_composited(struct vo *vo);
-void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis, int flags,
+bool vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis,
const char *classname);
+void vo_x11_config_vo_window(struct vo *vo);
int vo_x11_control(struct vo *vo, int *events, int request, void *arg);
#endif /* MPLAYER_X11_COMMON_H */