#include <vlc_common.h>
#include <vlc_plugin.h>
+#include <vlc_xlib.h>
#include <vlc_vout_display.h>
#include <vlc_vout_opengl.h>
#include "../opengl.h"
set_capability ("vout display", 50)
set_callbacks (Open, Close)
- add_shortcut ("xcb-glx")
- add_shortcut ("glx")
- add_shortcut ("opengl")
+ add_shortcut ("xcb-glx", "glx", "opengl", "xid")
vlc_module_end ()
struct vout_display_sys_t
*/
static int Open (vlc_object_t *obj)
{
- if (!XInitThreads ())
+ if (!vlc_xlib_init (obj))
return VLC_EGENERIC;
vout_display_t *vd = (vout_display_t *)obj;
/* */
vout_display_info_t info = vd->info;
info.has_pictures_invalid = false;
+ info.has_event_thread = true;
/* Setup vout_display_t once everything is fine */
vd->info = info;
vd->manage = Manage;
/* */
- vout_display_SendEventFullscreen (vd, false);
- vout_display_SendEventDisplaySize (vd, width, height, false);
+ bool is_fullscreen = vd->cfg->is_fullscreen;
+ if (is_fullscreen && vout_window_SetFullScreen (sys->embed, true))
+ is_fullscreen = false;
+ vout_display_SendEventFullscreen (vd, is_fullscreen);
+ vout_display_SendEventDisplaySize (vd, width, height, is_fullscreen);
return VLC_SUCCESS;
static void PictureRender (vout_display_t *vd, picture_t *pic)
{
- vout_display_sys_t *sys = vd->sys;
+ vout_display_sys_t *sys = vd->sys;
vout_display_opengl_Prepare (&sys->vgl, pic);
}
static void PictureDisplay (vout_display_t *vd, picture_t *pic)
{
vout_display_sys_t *sys = vd->sys;
+ xcb_connection_t *conn = XGetXCBConnection (sys->display);
+ xcb_force_screen_saver (conn, XCB_SCREEN_SAVER_RESET);
vout_display_opengl_Display (&sys->vgl, &vd->source);
+ xcb_flush (conn);
picture_Release (pic);
}