@@ -199,7 +199,23 @@ def test_the_accessors_no_other_test_reaches_round_trip() -> None:
199199 device_created = True
200200 assert server_event .seat is not None
201201 server_device = server_event .seat .new_device ()
202- server_device .configure (name = "accessor-device" , capabilities = caps )
202+ # The region is not decoration: absolute motion is defined
203+ # *in the device's region*, so a device configured with
204+ # POINTER_ABSOLUTE and no region has nowhere to put the
205+ # point and libeis drops the event. Local libei 1.6 happened
206+ # to deliver it anyway; the libei the CI runners install did
207+ # not, and the stricter behaviour is the correct one to write
208+ # against. (100, 200) sits inside this rectangle, and
209+ # `mapping_id` is deliberately left unset -- it needs libei
210+ # 1.1, which the declared-floor job does not have.
211+ # No `size`: libeis refuses one on a VIRTUAL device
212+ # ("Device type physical required for size"), and the region
213+ # is what an absolute device actually needs.
214+ server_device .configure (
215+ name = "accessor-device" ,
216+ capabilities = caps ,
217+ regions = (eis .ConfigureRegion (offset = (0 , 0 ), size = (1920 , 1080 )),),
218+ )
203219 server_device .add ()
204220 server_device .resume ()
205221 seen ["device_type" ] = server_device .device_type
@@ -250,8 +266,12 @@ def test_the_accessors_no_other_test_reaches_round_trip() -> None:
250266 assert seen ["modifiers" ] == ei .XkbModifiersEvent (
251267 depressed = 4 , latched = 0 , locked = 2 , group = 0
252268 )
253- # Not a fixed number: the device_type is whatever libeis assigns a device
254- # this package created, and the height is the configured region's or 0
255- # where none was configured. The binding being right is the claim.
269+ # `height` is 0 here, and exactly 0 is the right assertion rather than a
270+ # type check: it reports a *configured size*, which libeis accepts only
271+ # on a PHYSICAL device, so a VIRTUAL one like this is unsized by
272+ # definition. The region above does not change it -- a region is where
273+ # the device maps to, not how big the device is. device_type is whatever
274+ # libeis assigns a device this package created, so only its being a real
275+ # member of the enum is claimed.
256276 assert seen ["device_type" ] in tuple (eis .DeviceType )
257- assert isinstance ( seen ["height" ], int )
277+ assert seen ["height" ] == 0
0 commit comments