Commit 22798cab authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

caca: remove dummy resize code

Resizing is handled via the Refresh() function - only.
parent 6d62ce57
...@@ -151,7 +151,7 @@ enum { ...@@ -151,7 +151,7 @@ enum {
/* Ask the module to acknowledge/refuse the display size change requested /* Ask the module to acknowledge/refuse the display size change requested
* (externally or by VOUT_DISPLAY_EVENT_DISPLAY_SIZE) */ * (externally or by VOUT_DISPLAY_EVENT_DISPLAY_SIZE) */
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE, /* const vout_display_cfg_t *p_cfg, int is_forced */ VOUT_DISPLAY_CHANGE_DISPLAY_SIZE, /* const vout_display_cfg_t *p_cfg */
/* Ask the module to acknowledge/refuse fill display state change after /* Ask the module to acknowledge/refuse fill display state change after
* being requested externally */ * being requested externally */
......
...@@ -375,15 +375,8 @@ static int Control(vout_display_t *vd, int query, va_list ap) ...@@ -375,15 +375,8 @@ static int Control(vout_display_t *vd, int query, va_list ap)
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
{ {
const vout_display_cfg_t *cfg = va_arg(ap, const vout_display_cfg_t *); const vout_display_cfg_t *cfg = va_arg(ap, const vout_display_cfg_t *);
bool forced = va_arg(ap, int);
if (forced)
{
vout_window_SetSize(sys->embed,
cfg->display.width, cfg->display.height);
return VLC_EGENERIC; /* Always fail. See x11.c for rationale. */
}
vout_display_place_t place; vout_display_place_t place;
vout_display_PlacePicture(&place, &vd->source, cfg, false); vout_display_PlacePicture(&place, &vd->source, cfg, false);
if (place.width != vd->fmt.i_visible_width if (place.width != vd->fmt.i_visible_width
|| place.height != vd->fmt.i_visible_height) || place.height != vd->fmt.i_visible_height)
......
...@@ -311,23 +311,14 @@ static int Control(vout_display_t *vd, int query, va_list args) ...@@ -311,23 +311,14 @@ static int Control(vout_display_t *vd, int query, va_list args)
{ {
vout_display_sys_t *sys = vd->sys; vout_display_sys_t *sys = vd->sys;
(void) args;
switch (query) { switch (query) {
case VOUT_DISPLAY_HIDE_MOUSE: case VOUT_DISPLAY_HIDE_MOUSE:
caca_set_mouse(sys->dp, 0); caca_set_mouse(sys->dp, 0);
return VLC_SUCCESS; return VLC_SUCCESS;
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: { case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
const vout_display_cfg_t *cfg = va_arg(args, const vout_display_cfg_t *);
caca_refresh_display(sys->dp);
/* Not quite good but not sure how to resize it */
if ((int)cfg->display.width != caca_get_display_width(sys->dp) ||
(int)cfg->display.height != caca_get_display_height(sys->dp))
return VLC_EGENERIC;
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_ZOOM: case VOUT_DISPLAY_CHANGE_ZOOM:
case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED: case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
......
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