Skip to content

Fixes xbox controller crashing the Terminal#20234

Open
phil-scott-78 wants to merge 1 commit into
microsoft:mainfrom
phil-scott-78:dev/phils/fix-gamepad-tabview-crash
Open

Fixes xbox controller crashing the Terminal#20234
phil-scott-78 wants to merge 1 commit into
microsoft:mainfrom
phil-scott-78:dev/phils/fix-gamepad-tabview-crash

Conversation

@phil-scott-78

Copy link
Copy Markdown

Summary of the Pull Request

Fixes a denial of service by a toddler with an Xbox controller wanting to play Forza. They can impatiently press up and down and close out the terminal window.

Issue is upstream in WinUI, but I think this gathers things into a state where Terminal can at least recover by adding a GettingFocus handler on the TabViewItem that cancels that gamepad focus move before it reaches the framework handler.

References and Relevant Issues

Issue #19671 and #20089

Validation Steps Performed

Handed a controller to my toddler while working in terminal. I also banged on the keys myself.

PR Checklist

@DHowett DHowett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy sh-t, thank you!

Can you add the word "BODGY" in all caps to the comment somewhere? Look about the codebase - we use it everywhere XAML has ruined our day :)

Comment thread src/cascadia/TerminalApp/Tab.cpp Fixed
Comment thread src/cascadia/TerminalApp/Tab.cpp Fixed
@github-actions

This comment has been minimized.

@phil-scott-78 phil-scott-78 force-pushed the dev/phils/fix-gamepad-tabview-crash branch from d61a3d7 to 1e8b1aa Compare May 15, 2026 23:28
@phil-scott-78

Copy link
Copy Markdown
Author

BODGY added. I am hesitant to listen to the robots on their spelling suggestions though

@github-actions

This comment has been minimized.

@DHowett

DHowett commented May 15, 2026

Copy link
Copy Markdown
Member

Nah, check-spelling has historically been very good to us. empts seems like a real one, and we just haven't had need of the word Xbox in this repo. Instead of running its Perl script, throw Xbox into .github/**/microsoft.txt

…abView::OnListViewGettingFocus. Add a GettingFocus handler on the TabViewItem that cancels that gamepad focus move before it reaches the framework handler.
@phil-scott-78 phil-scott-78 force-pushed the dev/phils/fix-gamepad-tabview-crash branch from 1e8b1aa to 5f6a14e Compare May 16, 2026 01:17
@phil-scott-78

Copy link
Copy Markdown
Author

ha, fair enough. Got those tweaks made and it looks like the robots are at peace.

@DHowett

DHowett commented May 16, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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.

Crashing after switching tabs using an Xbox controller

3 participants