Commit 22b6f35c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

x11: do not pretend that the video window was resized (refs #8696)

If the core requests a change of the size of the video window, and
the display plugin returns success, the display configuration stored in
the core goes out of synchronization with the X11 server. This results
in incorrect video placement.

Since it cannot be known if resize will succeed or not (at least not
without patching all window provider plugins to block and cross-check),
just return an error.
parent 281553a2
......@@ -474,11 +474,17 @@ static int Control (vout_display_t *vd, int query, va_list ap)
(const vout_display_cfg_t*)va_arg (ap, const vout_display_cfg_t *);
const bool is_forced = (bool)va_arg (ap, int);
if (is_forced
&& vout_window_SetSize (sys->embed,
p_cfg->display.width,
p_cfg->display.height))
if (is_forced)
{ /* Changing the dimensions of the parent window takes place
* asynchronously (in the X server). Also it might fail or result
* in different dimensions than requested. Request the size change
* and return a failure since the size is not (yet) changed.
* If the change eventually succeeds, HandleParentStructure()
* will trigger a non-forced display size change later. */
vout_window_SetSize (sys->embed, p_cfg->display.width,
p_cfg->display.height);
return VLC_EGENERIC;
}
vout_display_place_t place;
vout_display_PlacePicture (&place, &vd->source, p_cfg, false);
......
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