Commit 0e119e3e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

display: pass window via display configuration

The window is created ahead of the display and cannot change (except
for being deleted) anyway.
parent ba8fc0db
......@@ -66,6 +66,7 @@ typedef enum
* Initial/Current configuration for a vout_display_t
*/
typedef struct {
struct vout_window_t *window; /**< Window */
#if defined(_WIN32) || defined(__OS2__)
bool is_fullscreen VLC_DEPRECATED; /* Is the display fullscreen */
#endif
......
......@@ -637,8 +637,7 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
static vout_window_t *VoutDisplayNewWindow(vout_display_t *vd, unsigned type)
{
vout_display_owner_sys_t *osys = vd->owner.sys;
vout_window_t *window = vout_NewDisplayWindow(osys->vout);
vout_window_t *window = vd->cfg->window;
if (window == NULL)
return NULL;
......
......@@ -33,7 +33,6 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
/* FIXME should not be there */
void vout_SendDisplayEventMouse(vout_thread_t *, const vlc_mouse_t *);
vout_window_t *vout_NewDisplayWindow(vout_thread_t *);
void vout_DeleteDisplayWindow(vout_thread_t *);
void vout_SetDisplayWindowSize(vout_thread_t *, unsigned, unsigned);
......
......@@ -569,6 +569,7 @@ void vout_ControlChangeViewpoint(vout_thread_t *vout,
static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, const char *title)
{
/* Load configuration */
cfg->window = vout->p->window;
#if defined(_WIN32) || defined(__OS2__)
cfg->is_fullscreen = var_GetBool(vout, "fullscreen")
|| var_GetBool(vout, "video-wallpaper");
......@@ -607,12 +608,6 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, cons
cfg->align.vertical = VOUT_DISPLAY_ALIGN_BOTTOM;
}
vout_window_t *vout_NewDisplayWindow(vout_thread_t *vout)
{
assert(vout->p->splitter_name == NULL);
return vout->p->window;
}
void vout_DeleteDisplayWindow(vout_thread_t *vout)
{
if (vout->p->window != NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment