diff options
| author | srdusr <[email protected]> | 2025-02-05 09:46:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2025-02-05 09:46:00 +0200 |
| commit | d25f28c5a779438bef01106ba2b28874e24d5029 (patch) | |
| tree | ead8c581c9f7737c7276669f9bb105c4646b91b7 | |
| parent | 379466fe866f006700df9ace16c12ad78adb9a83 (diff) | |
| download | srdwm-d25f28c5a779438bef01106ba2b28874e24d5029.tar.gz srdwm-d25f28c5a779438bef01106ba2b28874e24d5029.zip | |
Add temporary tracing to layer-surface hit-testing for a live dock-input report
Logs the layer kind, namespace, arranged geometry, surface-local hit
point, and the surface's actual committed input region for every
candidate the hit-test walks. Answers two open questions from a live
report of a dock receiving zero pointer input despite a correctly-set
input region as measured from the client side: whether arrange() is
giving the surface its full requested size or clamping it to the
exclusive zone, and whether this compositor's own view of the
committed input region actually matches what the client set. Remove
once that's settled.
| -rw-r--r-- | crates/wayland/src/input.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/wayland/src/input.rs b/crates/wayland/src/input.rs index f737957..be5b15f 100644 --- a/crates/wayland/src/input.rs +++ b/crates/wayland/src/input.rs @@ -89,6 +89,29 @@ pub(crate) fn layer_surface_under_layers(state: &CompState, pos: Point<f64, Logi if !geo.to_f64().contains(local) { continue; } + // Temporary: tracing a live report that a bottom-anchored + // layer surface (a dock) receives no pointer input at all, + // despite its own committed input region - as measured from + // the AGS side - covering the point being tested. Logs + // exactly what this compositor's own view of that surface is + // at the moment of the hit-test, so the two sides' numbers can + // be compared directly instead of guessed at. Remove once + // that's settled. + let local_in_surface = local - geo.loc.to_f64(); + // `None` here means "no region ever committed" - per-protocol + // that means the *whole* surface is input-sensitive, not that + // nothing is, so it is its own distinct, meaningful answer. + let region_dump = with_states(layer.wl_surface(), |states| { + states.cached_state.get::<smithay::wayland::compositor::SurfaceAttributes>().current().input_region.as_ref().map(|r| r.rects.clone()) + }); + log::info!( + "layer_hit_test: layer={:?} namespace={:?} geo={:?} local_in_surface={:?} input_region={:?}", + layer_kind, + layer.namespace(), + geo, + local_in_surface, + region_dump + ); if let Some((surface, surface_loc)) = layer.surface_under(local - geo.loc.to_f64(), WindowSurfaceType::ALL) { return Some((surface, origin + geo.loc + surface_loc)); } |