Repository navigation
Commit dd522c1
committed
Fix native window drags losing mouse gestures on macOS and Windows
macOS: StartResizing dequeued the mouse-up in its tracking loop and
performWindowDragWithEvent: takes it too, so the view that got the
mouse-down never saw it. Flutter kept its button state down, reported the
next press as a move, and every second gesture was lost. Forward (or
synthesize) the mouse-up to the window.
Windows: StartDragging posted WM_NCLBUTTONDOWN without releasing the capture
held by the view under the press, so the system move loop never started.
Share one path with StartResizing: release capture, pass the cursor position,
and skip the hand-over when the primary button is already up, which would
otherwise glue the window to the cursor until the next click.
Found by tools/gui/flutter_window_drag_areas_test in the workspace.1 parent 069d64c commit dd522c1
2 files changed
Lines changed: 47 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
708 | 727 | | |
709 | 728 | | |
710 | | - | |
711 | | - | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
712 | 736 | | |
713 | 737 | | |
714 | 738 | | |
| |||
745 | 769 | | |
746 | 770 | | |
747 | 771 | | |
| 772 | + | |
748 | 773 | | |
749 | 774 | | |
750 | 775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1156 | 1174 | | |
1157 | 1175 | | |
1158 | | - | |
1159 | | - | |
| 1176 | + | |
1160 | 1177 | | |
1161 | 1178 | | |
1162 | 1179 | | |
| |||
1192 | 1209 | | |
1193 | 1210 | | |
1194 | 1211 | | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
| 1212 | + | |
1201 | 1213 | | |
1202 | 1214 | | |
1203 | 1215 | | |
| |||
0 commit comments