zoom: Call weston_output_activate_zoom() appropriately

No longer call weston_output_update_zoom() when trying to zoom out
on an unzoomed output.

Add an assert() to make sure update_zoom is never called without an
active zoom.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Derek Foreman
2015-07-23 14:55:13 -05:00
committed by Bryce Harrington
parent 859b52b62e
commit 25bd8a71fc
2 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -4804,7 +4804,10 @@ do_zoom(struct weston_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 if (!output->zoom.active) {
if (!output->zoom.active) {
if (output->zoom.level <= 0.0)
continue;
weston_output_activate_zoom(output);
}