Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shell/platform/windows/flutter_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ PhysicalWindowBounds FlutterWindow::GetPhysicalWindowBounds() {
}

void FlutterWindow::UpdateFlutterCursor(const std::string& cursor_name) {
current_cursor_ = GetCursorByName(cursor_name);
SetFlutterCursor(GetCursorByName(cursor_name));
}

void FlutterWindow::SetFlutterCursor(HCURSOR cursor) {
Expand Down
7 changes: 7 additions & 0 deletions shell/platform/windows/flutter_window_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -436,5 +436,12 @@ TEST(FlutterWindowTest, PosthumousWindowMessage) {
EXPECT_GE(msg_count, 1);
}

TEST(FlutterWindowTest, UpdateCursor) {
FlutterWindow win32window(100, 100);
win32window.UpdateFlutterCursor("text");
HCURSOR cursor = ::GetCursor();
EXPECT_EQ(cursor, ::LoadCursor(nullptr, IDC_IBEAM));
}

} // namespace testing
} // namespace flutter