compositor-drm: Enable seat constraining when configured in weston.ini
This change tweaks weston_pointer_clamp to take into consideration if a
seat is constrained to a particular output by only considering the
pointer position valid if it is within the output we a constrained to.
This function is also used for the initial warping of the pointer when a
constraint is first established.
The other two changes are the application of the constraint when either
a new device added or a new output created and therefore outputs and
input devices can be brought up in either order.
v2: the code in create_output_for_connector has been spun off into a
new function setup_output_seat_constraint (Ander). The inappropriate
warping behaviour has been resolved by using weston_pointer_clamp
(Pekka).
diff --git a/src/compositor.h b/src/compositor.h
index 45a14d6..4191950 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -437,6 +437,8 @@
struct weston_keyboard *keyboard;
struct weston_touch *touch;
+ struct weston_output *output; /* constraint */
+
struct wl_signal destroy_signal;
struct weston_compositor *compositor;