Skip to content

Prevent first-keystroke UI stalls by suppressing WM_GETOBJECT on the launcher window - #4596

Draft
jjw24 with Copilot wants to merge 2 commits into
devfrom
copilot/bug-fix-flowlauncher-freezing
Draft

Prevent first-keystroke UI stalls by suppressing WM_GETOBJECT on the launcher window#4596
jjw24 with Copilot wants to merge 2 commits into
devfrom
copilot/bug-fix-flowlauncher-freezing

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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_GETOBJECT and entering the UI Automation provider path on the UI thread.

  • Main window message handling

    • Intercept WM_GETOBJECT in MainWindow's existing HwndSource hook.
    • Mark the message as handled and return immediately so the launcher window does not enter WPF's synchronous automation-provider path during typing.
    • Scope is limited to the main search window; existing handling for other window messages remains unchanged.
  • Behavioral boundary

    • Only WM_GETOBJECT is suppressed.
    • Other messages continue through the current WndProc switch unchanged.
  • Regression coverage

    • Add a focused test that verifies the suppression predicate matches WM_GETOBJECT and does not suppress unrelated messages.
private const int WmGetObject = 0x003D;

private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
    if (msg == WmGetObject)
    {
        handled = true;
        return IntPtr.Zero;
    }

    // existing message handling...
}

Copilot AI linked an issue Jul 30, 2026 that may be closed by this pull request
3 tasks
Copilot AI changed the title [WIP] Fix Flowlauncher freezing after typing first character Prevent first-keystroke UI stalls by suppressing WM_GETOBJECT on the launcher window Jul 30, 2026
Copilot AI requested a review from jjw24 July 30, 2026 12:12
Copilot finished work on behalf of jjw24 July 30, 2026 12:12
@jjw24 jjw24 removed their assignment Jul 30, 2026
Copilot finished work on behalf of jjw24 July 30, 2026 12:18
Copilot finished work on behalf of jjw24 July 30, 2026 12:24
Copilot finished work on behalf of jjw24 July 30, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Flowlauncher freezing after typing in one character

2 participants