From 25bd8a71fc7ca7015b03138490545ddc7f10c0d4 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 23 Jul 2015 14:55:13 -0500 Subject: 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 --- desktop-shell/shell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'desktop-shell') diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 9e3701fc..48bee343 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -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); } -- cgit v1.2.1