DIAG prints for a cancelled floating pane move: the rect it reports

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Martin Ball
2026-11-18 16:19:49 +00:00
co-authored by Claude Sonnet 5.5
parent f905158869
commit 080d8f642a
2 changed files with 5 additions and 0 deletions
@@ -449,6 +449,10 @@ impl BodyHooks<'_> {
_ => return,
};
let Some(began) = self.mode.began else { return };
eprintln!(
"DIAG escape_during_a_pane_title_drag_cancels_it_and_reaches_nothing_else: began={began:?} core_rect={rect:?} current={:?}/{:?}",
current.pos, current.size
);
let (dx, dy, _) = grip.map_or((0, 0, CursorIcon::Grab), |index| GRIPS[index]);
let kind = if grip.is_some() { PlacementKind::Size(edge_of(dx, dy)) } else { PlacementKind::Move };
let next = match pos {
@@ -794,6 +794,7 @@ fn show_floating<P: Clone + Eq + Hash + Debug + Send + Sync + 'static>(ui: &mut
// A cancelled move or resize (Escape) reports the rect from before the gesture: the app takes it back, as the
// steps of the gesture moved its kept rect. A click on the title with no drag reports nothing.
if let Some(change) = shown.placed {
eprintln!("DIAG escape_during_a_pane_title_drag_cancels_it_and_reaches_nothing_else: placed {:?} kind {:?} given {rect:?}", change.rect, change.kind);
pass.sink.borrow_mut().push(PaneRequest::FloatRect(pane.pane.clone(), change.rect));
}
if shown.minimized_toggled {