summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2015-07-23 14:55:13 -0500
committerBryce Harrington <bryce@osg.samsung.com>2015-07-29 19:47:31 -0700
commit25bd8a71fc7ca7015b03138490545ddc7f10c0d4 (patch)
tree6eb34afd08f6072abad70c58328b26f5f6beb07d /src
parent859b52b62e043b89e8d6da4b4a2ee27c79a796ea (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/zoom.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/zoom.c b/src/zoom.c
index 6305427c..18fc7cac 100644
--- a/src/zoom.c
+++ b/src/zoom.c
@@ -25,6 +25,7 @@
#include "config.h"
+#include <assert.h>
#include <stdlib.h>
#include <stdbool.h>
@@ -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;