zoom: Store the seat that initiated a zoom

Track the seat that initiated a seat instead of picking the first one.

Previously, if there are multiple seats then any seat can adjust the zoom
level but the zoom tracks the first seat's pointer.

Now the zoom will follow the pointer of the seat that initiated the zoom.

Additionally, if there's no pointer in the first seat, starting a zoom
with the second seat will no longer crash weston.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Derek Foreman
2015-07-23 14:55:15 -05:00
committed by Bryce Harrington
parent 25bd8a71fc
commit 22276a596a
3 changed files with 10 additions and 13 deletions
+1 -1
View File
@@ -4808,7 +4808,7 @@ do_zoom(struct weston_seat *seat, uint32_t time, uint32_t key, uint32_t axis,
if (!output->zoom.active) {
if (output->zoom.level <= 0.0)
continue;
weston_output_activate_zoom(output);
weston_output_activate_zoom(output, seat);
}
output->zoom.spring_z.target = output->zoom.level;