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>
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);
}
#include "config.h"
+#include <assert.h>
#include <stdlib.h>
#include <stdbool.h>
{
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;