Enable floating chat window resizing everywhere

Install directional hit regions in the shared window layer so floating chats can be moved and resized on every destination. Keep geometry updates in the shared manager and cover directional resizing with window host regressions.
This commit is contained in:
2026-11-13 18:00:53 +00:00
parent 5639e5cb05
commit cfd9f22f4b
4 changed files with 265 additions and 19 deletions
+29
View File
@@ -179,3 +179,32 @@ class WindowResizeCorner extends StatelessWidget {
),
);
}
/// A transparent resize hit region. The visible lower-right affordance
/// remains [WindowResizeCorner]; the other regions deliberately add no chrome.
class WindowResizeHandle extends StatelessWidget {
const WindowResizeHandle({
super.key,
required this.cursor,
required this.onResize,
required this.onResizeEnd,
this.child,
});
final MouseCursor cursor;
final ValueChanged<Offset> onResize;
final VoidCallback onResizeEnd;
final Widget? child;
@override
Widget build(BuildContext context) => MouseRegion(
cursor: cursor,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
dragStartBehavior: DragStartBehavior.down,
onPanUpdate: (details) => onResize(details.delta),
onPanEnd: (_) => onResizeEnd(),
child: child ?? const SizedBox.expand(),
),
);
}