fix mouse jumping: query GDK pointer position at call time
Flutter's globalPosition is window-relative, not screen-absolute. Now using gdk_device_get_position() on the native side to get the actual screen coordinates at the moment startDrag/startResize is called. Dart no longer passes coordinates — the native handler queries the pointer directly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -221,7 +221,7 @@ class _HatBar extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final tokens = ClideTheme.of(context).surface;
|
||||
return GestureDetector(
|
||||
onPanStart: (d) => kernel.window.startDrag(d.globalPosition),
|
||||
onPanStart: (_) => kernel.window.startDrag(),
|
||||
child: Container(
|
||||
height: hatHeight,
|
||||
decoration: BoxDecoration(
|
||||
|
||||
Reference in New Issue
Block a user