#include <X11/extensions/Xsp.h>
#endif
-#ifdef HAVE_SYS_SHM_H
-# include <sys/shm.h> /* shmget(), shmctl() */
-#endif
-
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xmd.h>
#include <X11/Xutil.h>
-#ifdef HAVE_SYS_SHM_H
+#if defined (HAVE_SYS_SHM_H) && !defined (MODULE_NAME_IS_glx)
+# include <sys/shm.h> /* shmget(), shmctl() */
# include <X11/extensions/XShm.h>
#endif
#ifdef DPMSINFO_IN_DPMS_H
static int InitVideo ( vout_thread_t * );
static void EndVideo ( vout_thread_t * );
static void DisplayVideo ( vout_thread_t *, picture_t * );
+static int InitDisplay ( vout_thread_t * );
#endif
static int ManageVideo ( vout_thread_t * );
static int Control ( vout_thread_t *, int, va_list );
-static int InitDisplay ( vout_thread_t * );
-
static int CreateWindow ( vout_thread_t *, x11_window_t * );
static void DestroyWindow ( vout_thread_t *, x11_window_t * );
#ifndef MODULE_NAME_IS_glx
static int NewPicture ( vout_thread_t *, picture_t * );
static void FreePicture ( vout_thread_t *, picture_t * );
-#endif
-
-#ifdef HAVE_SYS_SHM_H
+# ifdef HAVE_SYS_SHM_H
static int i_shm_major = 0;
+# endif
#endif
static void ToggleFullScreen ( vout_thread_t * );
return VLC_EGENERIC;
}
+#ifndef MODULE_NAME_IS_glx
/* Open and initialize device. */
if( InitDisplay( p_vout ) )
{
free( p_vout->p_sys );
return VLC_EGENERIC;
}
+#endif
/* Disable screen saver */
DisableXScreenSaver( p_vout );
}
#endif
+#ifndef MODULE_NAME_IS_glx
/*****************************************************************************
* InitDisplay: open and initialize X11 device
*****************************************************************************
return VLC_SUCCESS;
}
-#ifndef MODULE_NAME_IS_glx
-
#ifdef HAVE_SYS_SHM_H
/*****************************************************************************
* CreateShmImage: create an XImage or XvImage using shared memory extension
return 0;
}
-#ifdef HAVE_SYS_SHM_H
+#if defined (HAVE_SYS_SHM_H) && !defined (MODULE_NAME_IS_glx)
if( event->request_code == i_shm_major ) /* MIT-SHM */
{
fprintf( stderr,
x11_window_t window;
/* X11 generic properties */
-#ifdef HAVE_SYS_SHM_H
+#if defined (HAVE_SYS_SHM_H) && !defined (MODULE_NAME_IS_glx)
int i_shm_opcode; /* shared memory extension opcode */
#endif
#endif
};
+#ifndef MODULE_NAME_IS_glx
/*****************************************************************************
* picture_sys_t: direct buffer method descriptor
*****************************************************************************
int nb_display;
#endif
};
+#endif
/*****************************************************************************
* mwmhints_t: window manager hints