Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 0b87117

Browse files
committed
Attempt #1 to fix CI failures
1 parent ee63ea9 commit 0b87117

15 files changed

+56
-22
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,9 @@ FILE: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/plu
16471647
FILE: ../../../flutter/shell/platform/windows/client_wrapper/plugin_registrar_windows_unittests.cc
16481648
FILE: ../../../flutter/shell/platform/windows/cursor_handler.cc
16491649
FILE: ../../../flutter/shell/platform/windows/cursor_handler.h
1650+
FILE: ../../../flutter/shell/platform/windows/direct_manipulation.cc
1651+
FILE: ../../../flutter/shell/platform/windows/direct_manipulation.h
1652+
FILE: ../../../flutter/shell/platform/windows/direct_manipulation_unittests.cc
16501653
FILE: ../../../flutter/shell/platform/windows/display_helper_winuwp.cc
16511654
FILE: ../../../flutter/shell/platform/windows/display_helper_winuwp.h
16521655
FILE: ../../../flutter/shell/platform/windows/dpi_utils_win32.cc

lib/web_ui/lib/src/engine/pointer_converter.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,11 @@ class PointerDataConverter {
613613
);
614614
_pointers.remove(device);
615615
break;
616+
case ui.PointerChange.flowStart:
617+
case ui.PointerChange.flowUpdate:
618+
case ui.PointerChange.flowEnd:
619+
// Pointer flow events are not gemerated on web
620+
break;
616621
}
617622
} else {
618623
switch (signalKind) {

shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ - (void)surfaceUpdated:(BOOL)appeared;
119119
- (void)performOrientationUpdate:(UIInterfaceOrientationMask)new_preferences;
120120
- (void)handlePressEvent:(FlutterUIPressProxy*)press
121121
nextAction:(void (^)())next API_AVAILABLE(ios(13.4));
122-
- (void)scrollEvent:(UIPanGestureRecognizer*)recognizer;
122+
- (void)panEvent:(UIPanGestureRecognizer*)recognizer;
123123
- (void)updateViewportMetrics;
124124
@end
125125

@@ -831,7 +831,7 @@ - (void)testMouseSupport API_AVAILABLE(ios(13.4)) {
831831
id mockPanGestureRecognizer = OCMClassMock([UIPanGestureRecognizer class]);
832832
XCTAssertNotNil(mockPanGestureRecognizer);
833833

834-
[vc scrollEvent:mockPanGestureRecognizer];
834+
[vc panEvent:mockPanGestureRecognizer];
835835

836836
[[[self.mockEngine verify] ignoringNonObjectArgs]
837837
dispatchPointerDataPacket:std::make_unique<flutter::PointerDataPacket>()];

shell/platform/fuchsia/flutter/platform_view.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,11 @@ bool PlatformView::OnHandlePointerEvent(
428428
FML_DLOG(ERROR) << "Received hover event for down pointer.";
429429
}
430430
break;
431+
case flutter::PointerData::Change::kFlowStart:
432+
case flutter::PointerData::Change::kFlowUpdate:
433+
case flutter::PointerData::Change::kFlowEnd:
434+
FML_DLOG(ERROR) << "Unexpectedly received pointer flow event";
435+
break;
431436
}
432437

433438
auto packet = std::make_unique<flutter::PointerDataPacket>(1);

shell/platform/windows/BUILD.gn

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,8 @@ source_set("uwptool_utils") {
336336
"uwptool_utils.h",
337337
]
338338

339+
defines = [ "_SILENCE_CLANG_COROUTINE_MESSAGE" ]
340+
339341
deps = [ ":string_conversion" ]
340342
}
341343

@@ -352,6 +354,8 @@ executable("uwptool") {
352354
]
353355
}
354356

357+
defines = [ "_SILENCE_CLANG_COROUTINE_MESSAGE" ]
358+
355359
sources = [ "uwptool_main.cc" ]
356360
deps = [
357361
":string_conversion",

shell/platform/windows/direct_manipulation.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ DirectManipulationOwner::DirectManipulationOwner(WindowWin32* window)
119119
int DirectManipulationOwner::Init(unsigned int width, unsigned int height) {
120120
HRESULT hr = CoCreateInstance(
121121
CLSID_DirectManipulationManager, nullptr, CLSCTX_INPROC_SERVER,
122-
IID_IDirectManipulationManager, manager_.put_void());
122+
IID_IDirectManipulationManager, &manager_);
123123
if (FAILED(hr)) {
124124
FML_LOG(ERROR)
125125
<< "CoCreateInstance(CLSID_DirectManipulationManager) failed";
@@ -128,7 +128,7 @@ int DirectManipulationOwner::Init(unsigned int width, unsigned int height) {
128128
}
129129

130130
hr = manager_->GetUpdateManager(IID_IDirectManipulationUpdateManager,
131-
updateManager_.put_void());
131+
&updateManager_);
132132
if (FAILED(hr)) {
133133
FML_LOG(ERROR) << "GetUpdateManager failed";
134134
manager_ = nullptr;
@@ -138,7 +138,7 @@ int DirectManipulationOwner::Init(unsigned int width, unsigned int height) {
138138

139139
hr = manager_->CreateViewport(nullptr, window_->GetWindowHandle(),
140140
IID_IDirectManipulationViewport,
141-
viewport_.put_void());
141+
&viewport_);
142142
if (FAILED(hr)) {
143143
FML_LOG(ERROR) << "CreateViewport failed";
144144
manager_ = nullptr;

shell/platform/windows/direct_manipulation.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include "flutter/fml/memory/ref_counted.h"
99

10-
#include <winrt/base.h>
10+
#include <wrl/client.h>
1111
#include "directmanipulation.h"
1212

1313
namespace flutter {
@@ -32,9 +32,9 @@ class DirectManipulationOwner {
3232
private:
3333
WindowWin32* window_;
3434
DWORD viewportHandlerCookie_;
35-
winrt::com_ptr<IDirectManipulationManager> manager_;
36-
winrt::com_ptr<IDirectManipulationUpdateManager> updateManager_;
37-
winrt::com_ptr<IDirectManipulationViewport> viewport_;
35+
Microsoft::WRL::ComPtr<IDirectManipulationManager> manager_;
36+
Microsoft::WRL::ComPtr<IDirectManipulationUpdateManager> updateManager_;
37+
Microsoft::WRL::ComPtr<IDirectManipulationViewport> viewport_;
3838
fml::RefPtr<DirectManipulationEventHandler> handler_;
3939
};
4040

shell/platform/windows/flutter_window_win32.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,11 @@ bool FlutterWindowWin32::OnBitmapSurfaceUpdated(const void* allocation,
251251
return ret != 0;
252252
}
253253

254+
PointerLocation FlutterWindowWin32::GetPrimaryPointerLocation() {
255+
POINT point;
256+
GetCursorPos(&point);
257+
ScreenToClient(GetWindowHandle(), &point);
258+
return {(size_t)point.x, (size_t)point.y};
259+
}
260+
254261
} // namespace flutter

shell/platform/windows/flutter_window_win32.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ class FlutterWindowWin32 : public WindowWin32, public WindowBindingHandler {
124124
size_t row_bytes,
125125
size_t height) override;
126126

127+
PointerLocation GetPrimaryPointerLocation() override;
128+
127129
private:
128130
// A pointer to a FlutterWindowsView that can be used to update engine
129131
// windowing and input state.

shell/platform/windows/flutter_window_winuwp.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,4 +362,10 @@ bool FlutterWindowWinUWP::OnBitmapSurfaceUpdated(const void* allocation,
362362
return false;
363363
}
364364

365+
PointerLocation FlutterWindowWinUWP::GetPrimaryPointerLocation() {
366+
auto point = window_.PointerPosition();
367+
auto bounds = window_.Bounds();
368+
return {static_cast<size_t>(point.X - bounds.X), static_cast<size_t>(point.Y - bounds.Y)};
369+
}
370+
365371
} // namespace flutter

0 commit comments

Comments
 (0)