summaryrefslogtreecommitdiff
path: root/src/zoom.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2012-11-16 11:48:47 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-11-16 18:39:30 -0500
commitaa628d0a7ca486cb9b28dc6bc4cb26a22382c7e2 (patch)
tree715d58556c3eac4582a39d2c36677537ca19b1bc /src/zoom.c
parent5a84f3151474b49215fbef9c8def01f364f9b16e (diff)
downloadweston-aa628d0a7ca486cb9b28dc6bc4cb26a22382c7e2.tar.gz
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>
Diffstat (limited to 'src/zoom.c')
-rw-r--r--src/zoom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zoom.c b/src/zoom.c
index 674a80ea..3be27f61 100644
--- a/src/zoom.c
+++ b/src/zoom.c
@@ -123,7 +123,7 @@ weston_zoom_frame_z(struct weston_animation *animation,
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--;
}