Skip to content

Fix gh-5894: Mouse capture issues on Windows#6018

Merged
willmcgugan merged 1 commit into
Textualize:mainfrom
fancidev:gh-5894
Nov 10, 2025
Merged

Fix gh-5894: Mouse capture issues on Windows#6018
willmcgugan merged 1 commit into
Textualize:mainfrom
fancidev:gh-5894

Conversation

@fancidev

@fancidev fancidev commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

#5894 reports that when running a Textual app under Windows Terminal with mouse=False, the console gets polluted with garbage characters when the mouse is moved during and after the app's execution.

The issue is caused by an extraneous line in Textual's Windows driver. That line enables mouse support regardless of the mouse flag. However, mouse inputs are not handled when mouse=False; nor does the clean-up routine disable the mouse support when mouse=False. As a result, control sequences that encode mouse events are treated as regular input, and the screen gets polluted.

This PR fixes the issue by removing that extraneous line.

@willmcgugan willmcgugan 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.

thanks

@willmcgugan willmcgugan merged commit c539c25 into Textualize:main Nov 10, 2025
23 checks passed
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.

2 participants