git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commita21c7b0524244e963138a32d4b8dec621d78e917
parentd3121fa1cf
authorIsaac Freund <[email protected]>
date2026-01-02 02:35
Seat: apply mappings in attachDevice()

This ensures existing output/rectangle mappings are applied when moving
an input device between seats.

 river/Seat.zig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/river/Seat.zig b/river/Seat.zig
index 2875d85..dab563d 100644
--- a/river/Seat.zig
+++ b/river/Seat.zig
@@ -808,6 +808,8 @@ pub fn attachDevice(seat: *Seat, device: *InputDevice) void {
         },
         .pointer, .touch, .tablet => {
             seat.cursor.wlr_cursor.attachInputDevice(device.wlr_device);
+            seat.cursor.wlr_cursor.mapInputToOutput(device.wlr_device, device.config.map_to_output);
+            seat.cursor.wlr_cursor.mapInputToRegion(device.wlr_device, &device.config.map_to_rectangle);
         },
         .@"switch", .tablet_pad => unreachable, // unsupported
     }