summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-01-27 12:01:08 +0100
committerwm4 <wm4@nowhere>2013-01-27 13:32:27 +0100
commitdf80cd379ae2ea3fbbfd3f2a28e804b8882ea93a (patch)
tree4a29ae5b579a10baee13ee8065ad01beeefafe8f /video/out/x11_common.h
parent75164a0e0a409958d10f56b3dabea35914daeba3 (diff)
downloadmpv-df80cd379ae2ea3fbbfd3f2a28e804b8882ea93a.tar.bz2
mpv-df80cd379ae2ea3fbbfd3f2a28e804b8882ea93a.tar.xz
x11: simplify handling of X Visuals and Colormaps in VOs
Don't force VOs to pick an arbitrary default Visual and Colormap. They still can override them if needed. This simplifies the X11 VO interface. Always create a Colormap for simplicity. Using CopyFromParent fails if the selected visual is not the same of that of the parent window, which happens for me with vo_opengl. vo_vdpau and vo_xv explicitly set CWBorderPixel, do that in x11_common instead (it was already done for native windows, but not for slave mode windows). What gl_common did was incorrect in theory: freeing a colormap while a window uses it will change the colormap of the window to "None", and the color mapping for such windows is "undefined".
Diffstat (limited to 'video/out/x11_common.h')
-rw-r--r--video/out/x11_common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index 8cafd15650..47eaf1d880 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -43,6 +43,7 @@ struct vo_x11_state {
XIC xic;
GC vo_gc;
+ Colormap colormap;
int wm_type;
int fs_type;
@@ -116,14 +117,13 @@ int vo_x11_init(struct vo *vo);
void vo_x11_uninit(struct vo *vo);
int vo_x11_check_events(struct vo *vo);
void vo_x11_fullscreen(struct vo *vo);
-Colormap vo_x11_create_colormap(struct vo *vo, XVisualInfo *vinfo);
uint32_t vo_x11_set_equalizer(struct vo *vo, const char *name, int value);
uint32_t vo_x11_get_equalizer(struct vo *vo, const char *name, int *value);
bool vo_x11_screen_is_composited(struct vo *vo);
void fstype_help(void);
void vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis,
int x, int y, unsigned int width, unsigned int height, int flags,
- Colormap col_map, const char *classname);
+ const char *classname);
void vo_x11_clearwindow_part(struct vo *vo, Window vo_window,
int img_width, int img_height);
void vo_x11_clearwindow(struct vo *vo, Window vo_window);