Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting cursor position has too many routes #2739

Open
miniksa opened this issue Sep 12, 2019 · 1 comment
Open

Setting cursor position has too many routes #2739

miniksa opened this issue Sep 12, 2019 · 1 comment
Labels
Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase

Comments

@miniksa
Copy link
Member

miniksa commented Sep 12, 2019

Based on #2731, repeated here:

When it came to actually setting the cursor position, I found there were a number of options to choose from, with quite different behaviours. Some operations use a variation of SetConsoleCursorPosition, some use AdjustCursorPosition, and some call the SCREEN_INFORMATION::SetCursorPosition method directly, or even just Cursor::SetPosition. It wasn't always clear to why a particular method was chosen.

This certainly needs a follow up work item. I'm reviewing some of the code in each of these to try to come up with reasoning why you should use one over the other... and I'm realizing that this is probably the source of our "the cursor is blinking weirdly or is on when it shouldn't be while text is outputting" problems.

As far as I can tell, you've chosen the correct one with SCREEN_INFORMATION::SetCursorPosition because that one is responsible for updating the delay status on the cursor so it stays off or on instead of blinking wildly as it is moving rapidly around the screen when things are happening. The cursor is supposed to temporarily suspend blinking when there is activity (by the delay).

I am certain the inconsistency in application of which cursor-setting-function is being used is responsible for graphical glitches.

This work item represents auditing the cursor position setting methods to reconcile them into a (hopefully) more unified entry point. It probably also represents analyzing the assorted delay booleans that temporarily suspend cursor drawing to reconcile those as well. (Cursor::_fDelay and Cursor::_fIsVisible and Cursor::_fBlinkingAllowed and Cursor::fIsOn. and Cursor::f_DeferCursorRedraw.)

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Sep 12, 2019
@miniksa miniksa added Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase and removed Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Sep 12, 2019
@miniksa miniksa added this to the Console Backlog milestone Sep 12, 2019
@miniksa miniksa added the Help Wanted We encourage anyone to jump in on these. label Sep 12, 2019
@miniksa
Copy link
Member Author

miniksa commented Sep 12, 2019

Marking Help-Wanted because anyone is welcome to attempt to take on this task, but note that it probably has a larger scope than many other Help-Wanted tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase
Projects
None yet
Development

No branches or pull requests

2 participants