Skip to content

Commit fb9ebce

Browse files
committed
fix: CI
1 parent 2e27478 commit fb9ebce

5 files changed

Lines changed: 58 additions & 9 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,26 @@ All notable changes to python-libei are recorded here. The format follows
2222
negotiation rather than one test apiece, because the handshake is the
2323
expensive part and the values then have to agree within the same frame.
2424

25-
## [0.8.0] - 2026-10-20
25+
The absolute leg needed a region to be configured on the device. libei
26+
1.0.0's `ei_device_pointer_motion_absolute` ends in
27+
`if (!ei_device_in_region(device, x, y)) return;`, and with no region the
28+
list it walks is empty, so the event was *silently* dropped -- no log, no
29+
error, just an event that never arrived. Local libei 1.6 delivered it
30+
anyway, which is why this only showed up on the CI runners' 1.0.x.
31+
32+
### Fixed
33+
34+
- **`ei_region_convert_point` was marked as needing libei 1.1, and does
35+
not.** It is declared in libei 1.0.0's own public header and implemented
36+
there; the marker put it alongside its genuine 1.1 neighbours
37+
`ei_region_get_mapping_id` and `ei_device_region_at`. The weekly
38+
declared-floor job is what caught it -- building libei 1.0.0 from source
39+
found the symbol present where the marker promised it would be absent --
40+
which is the job working as intended rather than a flake. The README's
41+
version table no longer tells a reader on a 1.0.x build that
42+
`Region.convert_point()` is out of reach, and every remaining marker was
43+
swept against 1.0.0's real headers: 17 `ei_` and 18 `eis_` markers, none
44+
of them contradicted.
2645

2746
### Added
2847

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Exactly what was run, when, and against which versions:
188188

189189
| Needs | For |
190190
| --- | --- |
191-
| 1.1 | `Region.mapping_id`, `Region.convert_point()`, `Device.region_at()` |
191+
| 1.1 | `Region.mapping_id`, `Device.region_at()` |
192192
| 1.4 | ping/pong round trips (`Context.new_ping()`), `Context.disconnect()`, touch cancellation (`Touch.cancel()`) |
193193
| 1.5 | `eis.Client.pid` |
194194
| 1.6 | `Device.text_utf8()` / `text_keysym()` and TEXT events, `Seat.request_device()`, `Eis.set_flag()` |

‎src/libei/_capi/libei.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,13 @@
219219
"ei_region_get_mapping_id", (c_void_p,), c_char_p
220220
)
221221
# x and y are in/out parameters, overwritten only when the point is inside.
222-
region_convert_point = lib.function( # libei 1.1+
222+
# No version marker: this one is in libei 1.0.0's own public header and
223+
# implemented there, so every libei at or above the declared floor exports
224+
# it. It carried `# libei 1.1+` alongside its genuine 1.1 neighbours
225+
# `ei_region_get_mapping_id` and `ei_device_region_at`, and the weekly
226+
# floor job caught it -- building 1.0.0 from source found the symbol
227+
# present where the marker promised it would be absent.
228+
region_convert_point = lib.function(
223229
"ei_region_convert_point",
224230
(c_void_p, POINTER(c_double), POINTER(c_double)),
225231
c_bool,

‎tests/test_documentation_shape.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ def test_readme_version_gated_features_are_named_with_their_versions() -> None:
219219
("request_device", "1.6"),
220220
("new_ping", "1.4"),
221221
("disconnect", "1.4"),
222-
("convert_point", "1.1"),
222+
# `region_at`, not `convert_point`: the latter is in libei 1.0.0's
223+
# own header, so it is not version-gated and the README no longer
224+
# claims it is. `region_at` genuinely arrives in 1.1 and keeps that
225+
# row pinned.
226+
("region_at", "1.1"),
223227
):
224228
assert feature in readme, f"{feature} is no longer documented"
225229
assert version in readme, f"README no longer states the {version} requirement"

‎tests/test_integration_socketpair.py‎

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)