shell/zoom: Increment/decrement disable_planes only when zoom.active changes
disable_planes should only be incremented when zoom.active actually
toggles. Otherwise the counter will be incremented too many times,
and planes will no longer get used.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
diff --git a/src/zoom.c b/src/zoom.c
index 674a80e..3be27f6 100644
--- a/src/zoom.c
+++ b/src/zoom.c
@@ -123,7 +123,7 @@
output->zoom.spring_z.current = 0.0;
if (weston_spring_done(&output->zoom.spring_z)) {
- if (output->zoom.level <= 0.0) {
+ if (output->zoom.active && output->zoom.level <= 0.0) {
output->zoom.active = 0;
output->disable_planes--;
}