Skip to content
Merged
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
12 changes: 12 additions & 0 deletions windows/runner/view_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,18 @@ LRESULT CALLBACK ViewWindow::ViewProc(HWND hwnd, UINT const message,
auto* that =
static_cast<ViewWindow*>(GetThisFromHandle(::GetParent(hwnd)));

// Other apps asking for the view's accessibility objects (screen readers,
// and input methods, translators and the like that read what is on screen)
// get the system's plain answer for a window, not the engine's. The engine
// turns Flutter's semantics on at the first such question and keeps them on,
// which costs every frame (PipelineOwner.flushSemantics), and its hit test
// over that tree crashes on a child it has no node for
// (FlutterPlatformNodeDelegateWindows::HitTestSync, flutter/flutter#195653).
// The app makes no claim to work with screen readers.
if (message == WM_GETOBJECT) {
return ::DefWindowProcW(hwnd, message, wparam, lparam);
}

// The cursor's position, over the parts of the window that are the
// window's own, is this window's to answer — its buttons, and the strip
// Flutter draws the header in. The view is a child window over the whole
Expand Down
Loading