Prevent first-keystroke UI stalls by suppressing WM_GETOBJECT on the launcher window#4596
Conversation
|
@codex Review it |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81ac6c3896
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (ShouldSuppressWindowAutomationMessage(msg)) | ||
| { | ||
| handled = true; | ||
| return IntPtr.Zero; |
There was a problem hiding this comment.
Do not swallow every WM_GETOBJECT request
When Narrator, a screen reader, or another UI Automation/MSAA client queries the launcher, it relies on WM_GETOBJECT to obtain WPF's accessibility provider. Returning zero with handled = true prevents HwndSource from servicing every such request, making the query box and results—including the explicitly configured AutomationProperties.Name in MainWindow.xaml—unavailable to assistive technology. The stall mitigation must preserve normal accessibility-provider requests rather than unconditionally consuming this message.
Useful? React with 👍 / 👎.
Typing the first character could freeze Flow Launcher for ~15 seconds on affected systems. The stall was traced to the main WPF window servicing
WM_GETOBJECTand entering the UI Automation provider path on the UI thread.Main window message handling
WM_GETOBJECTinMainWindow's existingHwndSourcehook.Behavioral boundary
WM_GETOBJECTis suppressed.WndProcswitch unchanged.Regression coverage
WM_GETOBJECTand does not suppress unrelated messages.