/*****************************************************************************
* Module descriptor
*****************************************************************************/
+#define ADAPTOR_TEXT N_("XVideo adaptor number")
+#define ADAPTOR_LONGTEXT N_( \
+ "If you graphics card provides several adaptors, this option allows you " \
+ "to choose which one will be used (you shouldn't have to change this).")
+
+#define ALT_FS_TEXT N_("Alternate fullscreen method")
+#define ALT_FS_LONGTEXT N_( \
+ "There are two ways to make a fullscreen window, unfortunately each one " \
+ "has its drawbacks.\n" \
+ "1) Let the window manager handle your fullscreen window (default), but " \
+ "things like taskbars will likely show on top of the video.\n" \
+ "2) Completely bypass the window manager, but then nothing will be able " \
+ "to show on top of the video.")
+
+#define DISPLAY_TEXT N_("X11 display name")
+#define DISPLAY_LONGTEXT N_( \
+ "Specify the X11 hardware display you want to use. By default VLC will " \
+ "use the value of the DISPLAY environment variable.")
+
+#define SCREEN_TEXT N_("Screen to be used for fullscreen mode.")
+#define SCREEN_LONGTEXT N_( \
+ "Choose the screen you want to use in fullscreen mode. For instance " \
+ "set it to 0 for first screen, 1 for the second.")
+
vlc_module_begin();
set_description( _("X11 OpenGL provider") );
set_capability( "opengl provider", 50 );
set_callbacks( CreateOpenGL, DestroyOpenGL );
+
+ add_string( "glx-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
+ add_integer( "glx-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT, VLC_TRUE );
+ add_bool( "glx-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, VLC_TRUE );
+#ifdef HAVE_XINERAMA
+ add_integer ( "glx-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, VLC_TRUE );
+#endif
vlc_module_end();
/*****************************************************************************
XStoreName( p_vout->p_sys->p_display, p_win->base_window,
#ifdef MODULE_NAME_IS_x11
VOUT_TITLE " (X11 output)"
+#elif defined(MODULE_NAME_IS_glx)
+ VOUT_TITLE " (GLX output)"
#else
VOUT_TITLE " (XVideo output)"
#endif
/* Do NOT use XFlush here ! */
XSync( p_vout->p_sys->p_display, False );
- XDestroyWindow( p_vout->p_sys->p_display, p_win->video_window );
+ if( p_win->video_window != None )
+ XDestroyWindow( p_vout->p_sys->p_display, p_win->video_window );
+
XFreeGC( p_vout->p_sys->p_display, p_win->gc );
XUnmapWindow( p_vout->p_sys->p_display, p_win->base_window );
config_GetInt( p_vout, MODULE_STRING "-altfullscreen" );
XUnmapWindow( p_vout->p_sys->p_display,
- p_vout->p_sys->p_win->base_window);
+ p_vout->p_sys->p_win->base_window );
p_vout->p_sys->p_win = &p_vout->p_sys->fullscreen_window;
CreateWindow( p_vout, p_vout->p_sys->p_win );
+ XDestroyWindow( p_vout->p_sys->p_display,
+ p_vout->p_sys->fullscreen_window.video_window );
+ XReparentWindow( p_vout->p_sys->p_display,
+ p_vout->p_sys->original_window.video_window,
+ p_vout->p_sys->fullscreen_window.base_window, 0, 0 );
+ p_vout->p_sys->fullscreen_window.video_window =
+ p_vout->p_sys->original_window.video_window;
/* To my knowledge there are two ways to create a borderless window.
* There's the generic way which is to tell x to bypass the window
else
{
msg_Dbg( p_vout, "leaving fullscreen mode" );
+
+ XReparentWindow( p_vout->p_sys->p_display,
+ p_vout->p_sys->original_window.video_window,
+ p_vout->p_sys->original_window.base_window, 0, 0 );
+
+ p_vout->p_sys->fullscreen_window.video_window = None;
DestroyWindow( p_vout, &p_vout->p_sys->fullscreen_window );
p_vout->p_sys->p_win = &p_vout->p_sys->original_window;
XMapWindow( p_vout->p_sys->p_display,
- p_vout->p_sys->p_win->base_window);
+ p_vout->p_sys->p_win->base_window );
}
/* Unfortunately, using XSync() here is not enough to ensure the
case VOUT_CLOSE:
vlc_mutex_lock( &p_vout->p_sys->lock );
XUnmapWindow( p_vout->p_sys->p_display,
- p_vout->p_sys->p_win->base_window );
+ p_vout->p_sys->original_window.base_window );
vlc_mutex_unlock( &p_vout->p_sys->lock );
/* Fall through */
case VOUT_REPARENT:
vlc_mutex_lock( &p_vout->p_sys->lock );
XReparentWindow( p_vout->p_sys->p_display,
- p_vout->p_sys->p_win->base_window,
+ p_vout->p_sys->original_window.base_window,
DefaultRootWindow( p_vout->p_sys->p_display ),
0, 0 );
XSync( p_vout->p_sys->p_display, False );
- p_vout->p_sys->p_win->owner_window = 0;
+ p_vout->p_sys->original_window.owner_window = 0;
vlc_mutex_unlock( &p_vout->p_sys->lock );
return vout_vaControlDefault( p_vout, i_query, args );