Do not set output->current_mode in compositor.c

The field is already set - correctly - in the backend switch_mode.
setting output->current_mode to mode in compositor.c leads to bugs,
since mode can be freed by the shell.
For example, the shell allocates it on the stack for
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER

Signed-off-by: Axel Davy <axel.davy@ens.fr>
dev
Axel Davy 11 years ago committed by Kristian Høgsberg
parent 1b55a5918c
commit 40ee921fff
  1. 1
      src/compositor.c

@ -137,7 +137,6 @@ weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode
if (ret < 0) if (ret < 0)
return ret; return ret;
output->current_mode = mode;
output->current_scale = scale; output->current_scale = scale;
break; break;
case WESTON_MODE_SWITCH_RESTORE_NATIVE: case WESTON_MODE_SWITCH_RESTORE_NATIVE:

Loading…
Cancel
Save