Skip to content

Quick Send: align custom titlebar behavior and remove focus/z-order interference#285

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/fix-quick-send-dialog-titlebar-issues
Draft

Quick Send: align custom titlebar behavior and remove focus/z-order interference#285
Copilot wants to merge 4 commits intomasterfrom
copilot/fix-quick-send-dialog-titlebar-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

Quick Send diverged from the tray app’s window conventions: it used the system titlebar (including theme mismatch in dark mode) and force-kept foreground/topmost behavior that interfered with tray flyouts. This update aligns Quick Send with the existing custom titlebar model and stops it from reclaiming focus.

  • Titlebar parity with Hub/Canvas windows

    • Enable ExtendsContentIntoTitleBar.
    • Introduce a custom 48px titlebar region and wire it via SetTitleBar(...).
    • Keep content layout sizing consistent by accounting for titlebar height in window size updates.
  • Focus and z-order behavior

    • Remove forced topmost behavior (IsAlwaysOnTop) and topmost promotion logic.
    • Remove repeated foreground reacquisition loops.
    • Add deactivation dismissal so Quick Send closes when focus moves elsewhere (with a send-in-progress guard to avoid interrupting active submission).
  • Maintainability touch-ups in the same path

    • Replace titlebar magic values with named constants (TitleBarHeight, reserved controls width, title icon constant) in QuickSendDialog to make intent explicit.
ExtendsContentIntoTitleBar = true;
SetTitleBar(titleBar);

private void OnActivated(object sender, WindowActivatedEventArgs args)
{
    if (args.WindowActivationState == WindowActivationState.Deactivated)
    {
        if (_isSending) return;
        Close();
        return;
    }

    RequestInputFocus();
}

Copilot AI changed the title [WIP] Fix Quick Send dialog titlebar styling and z-order issues Quick Send: align custom titlebar behavior and remove focus/z-order interference May 6, 2026
Copilot AI requested a review from shanselman May 6, 2026 04:12
@shanselman
Copy link
Copy Markdown
Contributor

Thanks for working on the Quick Send focus/titlebar issue. I think this needs changes before it is safe to land.

The close-on-deactivation behavior can dismiss valid user workflows: Alt-Tab, clipboard/error-detail copying, IME or accessibility UI focus changes, and other transient focus loss can close the dialog and lose typed text or visible error context.

This also removes the existing Windows 10 foreground/topmost retry workaround without a replacement or validation. That workaround exists specifically for hotkey foreground restrictions, so removing it risks reintroducing the original reliability issue.

Keep the titlebar update while removing close-on-deactivation and restoring the Windows 10 hotkey foreground retry/topmost promotion path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Quick Send dialog: titlebar styling mismatch, focus/z-order issues

2 participants