summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-16 23:17:02 +0200
committerwm4 <wm4@nowhere>2014-05-16 23:17:02 +0200
commit7c2cf7cdf16876a58956985f3f54561efdfaaee3 (patch)
tree2861e7ca1b47c081a092a996b14ba0867ed08018
parent4ac4269389cda8a5fc4e8133d1046b93641e2d3b (diff)
downloadmpv-7c2cf7cdf16876a58956985f3f54561efdfaaee3.tar.bz2
mpv-7c2cf7cdf16876a58956985f3f54561efdfaaee3.tar.xz
x11: inline a function
Keeping it separate seems less readable.
-rw-r--r--video/out/x11_common.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 1aaa4943ab..17e4248d3a 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1125,14 +1125,6 @@ static void vo_x11_set_wm_icon(struct vo_x11_state *x11)
talloc_free(uncompressed.start);
}
-static void find_default_visual(struct vo_x11_state *x11, XVisualInfo *vis)
-{
- Display *display = x11->display;
- XWindowAttributes attribs;
- XGetWindowAttributes(display, DefaultRootWindow(display), &attribs);
- XMatchVisualInfo(display, x11->screen, attribs.depth, TrueColor, vis);
-}
-
static void vo_x11_create_window(struct vo *vo, XVisualInfo *vis, int x, int y,
unsigned int w, unsigned int h)
{
@@ -1144,7 +1136,9 @@ static void vo_x11_create_window(struct vo *vo, XVisualInfo *vis, int x, int y,
XVisualInfo vinfo_storage;
if (!vis) {
vis = &vinfo_storage;
- find_default_visual(x11, vis);
+ XWindowAttributes att;
+ XGetWindowAttributes(x11->display, x11->rootwin, &att);
+ XMatchVisualInfo(x11->display, x11->screen, att.depth, TrueColor, vis);
}
if (x11->colormap == None) {