summaryrefslogtreecommitdiffstats
path: root/video/out/vo_x11.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-04-21 07:30:03 +0200
committerwm4 <wm4@nowhere>2017-04-21 07:30:03 +0200
commit927afa311d4a89b022305508acbf4e7325fe3928 (patch)
tree4c6aafa3fb81e67fffdfd991f9cf96693e6f3fda /video/out/vo_x11.c
parent4d1eab6e552681ef961ce48af74f6795e7077fc6 (diff)
downloadmpv-927afa311d4a89b022305508acbf4e7325fe3928.tar.bz2
mpv-927afa311d4a89b022305508acbf4e7325fe3928.tar.xz
build: make various x11 protocol extension libs mandatory
Reduces the ifdeffery, which is good and will avoid silent breakages, or weird behavior if a lib is omitted. Also reorder the x11_common.c include statements.
Diffstat (limited to 'video/out/vo_x11.c')
-rw-r--r--video/out/vo_x11.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index 34a307bfbb..dd2d942c9a 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -37,7 +37,7 @@
#include "x11_common.h"
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
@@ -79,7 +79,7 @@ struct priv {
int current_buf;
bool reset_view;
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
int Shmem_Flag;
XShmSegmentInfo Shminfo[2];
int Shm_Warned_Slow;
@@ -91,7 +91,7 @@ static bool resize(struct vo *vo);
static bool getMyXImage(struct priv *p, int foo)
{
struct vo *vo = p->vo;
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
if (vo->x11->display_is_local && XShmQueryExtension(vo->x11->display)) {
p->Shmem_Flag = 1;
vo->x11->ShmCompletionEvent = XShmGetEventBase(vo->x11->display)
@@ -147,7 +147,7 @@ shmemerror:
}
p->myximage[foo]->data =
calloc(1, p->myximage[foo]->bytes_per_line * p->image_height + 32);
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
}
#endif
return true;
@@ -155,7 +155,7 @@ shmemerror:
static void freeMyXImage(struct priv *p, int foo)
{
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
struct vo *vo = p->vo;
if (p->Shmem_Flag) {
XShmDetach(vo->x11->display, &p->Shminfo[foo]);
@@ -284,7 +284,7 @@ static void Display_Image(struct priv *p, XImage *myximage)
p->reset_view = false;
}
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
if (p->Shmem_Flag) {
XShmPutImage(vo->x11->display, vo->x11->window, p->gc, x_image,
0, 0, p->dst.x0, p->dst.y0, p->dst_w, p->dst_h,
@@ -312,7 +312,7 @@ static struct mp_image get_x_buffer(struct priv *p, int buf_index)
static void wait_for_completion(struct vo *vo, int max_outstanding)
{
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
struct priv *ctx = vo->priv;
struct vo_x11_state *x11 = vo->x11;
if (ctx->Shmem_Flag) {