diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 9e3701fc4..48bee3435 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); } diff --git a/src/zoom.c b/src/zoom.c index 6305427c8..18fc7cac6 100644 --- a/src/zoom.c +++ b/src/zoom.c @@ -25,6 +25,7 @@ #include "config.h" +#include #include #include @@ -135,6 +136,8 @@ weston_output_update_zoom(struct weston_output *output) { struct weston_seat *seat = weston_zoom_pick_seat(output->compositor); + assert(output->zoom.active); + output->zoom.current.x = seat->pointer->x; output->zoom.current.y = seat->pointer->y;