summaryrefslogtreecommitdiff
path: root/src
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 19:25:42 -0500
commit3a7f0689c50c82db1258198b89d82be6ea9a9f49 (patch)
treee674487862e6d0c7d05acd9a6c18d77704ef7f4a /src
parent151c4366503110a3c5f63eac54f87e72a33138b0 (diff)
downloadweston-3a7f0689c50c82db1258198b89d82be6ea9a9f49.tar.gz
weston-3a7f0689c50c82db1258198b89d82be6ea9a9f49.tar.bz2
weston-3a7f0689c50c82db1258198b89d82be6ea9a9f49.zip
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')
-rw-r--r--src/shell.c2
-rw-r--r--src/zoom.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/shell.c b/src/shell.c
index d4662efd..012c2ac6 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -2439,7 +2439,7 @@ do_zoom(struct wl_seat *seat, uint32_t time, uint32_t key, uint32_t axis,
output->zoom.level = 0.0;
else if (output->zoom.level > output->zoom.max_level)
output->zoom.level = output->zoom.max_level;
- else {
+ else if (!output->zoom.active) {
output->zoom.active = 1;
output->disable_planes++;
}
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--;
}