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

Prevent "Options" propsheet from reverting cursor shape settings #2663

Merged
4 commits merged into from
Sep 9, 2019

Conversation

zadjii-msft
Copy link
Member

Summary of the Pull Request

Whenever you'd open the "options" propsheet, we'd always revert the "cursor shape" to "legacy". This is obviously bad. This PR will make is so the cursor shape will persist, and only selecting a size manually will set the shape to "legacy".

PR Checklist

Detailed Description of the Pull Request / Additional comments

We actually need to add a hidden radio button to the "size" radio buttons on the options page, which acts as a placeholder for "non-legacy". Whenever we set the shape to not-legacy, we'll check that hidden radio button. Otherwise, whenever the Options page is activated, the selected radio button from each group gets a BN_CLICKED notification, and if there's no button selected, the first will still get that notification.

Validation Steps Performed

I've opened the propsheet and really mucked with it a bunch. This feels right now.

src/propsheet/TerminalPage.cpp Outdated Show resolved Hide resolved
src/propsheet/console.rc Show resolved Hide resolved
@DHowett-MSFT DHowett-MSFT added the Needs-Second It's a PR that needs another sign-off label Sep 5, 2019
@ghost ghost requested review from miniksa and carlos-zamora September 5, 2019 15:53
Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

Looks good with Dustin's comments.

@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Sep 9, 2019
@ghost
Copy link

ghost commented Sep 9, 2019

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@DHowett-MSFT DHowett-MSFT removed the AutoMerge Marked for automatic merge by the bot when requirements are met label Sep 9, 2019
@DHowett-MSFT
Copy link
Contributor

Oh, one last thing. Would you check whether the new hidden radio button is in the tab stop order? It probably shouldn’t be if it is!

@zadjii-msft
Copy link
Member Author

@DHowett-MSFT Already checked, it isn't :)

@DHowett-MSFT DHowett-MSFT added the AutoMerge Marked for automatic merge by the bot when requirements are met label Sep 9, 2019
@ghost ghost merged commit ce34c73 into master Sep 9, 2019
@ghost ghost deleted the dev/migrie/b/1219-actual-fix branch September 9, 2019 14:45
DHowett-MSFT pushed a commit that referenced this pull request Sep 23, 2019
* this actually fixes #1219

* the terminal page should check the checkbox on the options page

* Discard these changes from #2651

* Add comments, pull function out to helper

(cherry picked from commit ce34c73)
DHowett pushed a commit that referenced this pull request May 28, 2020
For a radio button group to work properly, they need sequential IDs.
This moves the cursor radio buttons on the `conhost` property sheet to
be sequential.

## References
- Introduced with #2663
- Found while investigating #4186

## PR Checklist
* [x] Closes unfiled issue found while investigating #4186
* [x] I work here.
* [x] Manual test.
* [x] No documentation required.
* [x] Am core contributor.

## Detailed Description of the Pull Request / Additional comments
- `CheckRadioButton` takes a contiguous group of IDs. It will set one
  item in the list and then uncheck the rest. When a new one was added
  to the group, it was added to the end of the segment in the IDs file,
  but not immediately after the existing radio buttons. This means it
  accidentally turned off all the other buttons in the middle.
- To resolve this, I moved all the cursor buttons into their own
  sequential group number and I deprecated the old values.

## Validation Steps Performed
- [x] Ensured that the "Discard Old Duplicates" value was set in the
  registry, walked through debugger as `conhost` packed the `TRUE` value
  into the property sheet blob, walked through the property sheet
  `console.dll` as it unpacked the `TRUE`, then observed that the
  checkbox was actually set instead of getting unset by the
  `CheckRadioButton` call that went from 107 to 119 and accidentally
  unchecked number 112, `IDD_HISTORY_NODUP` even though I swear it was
  just set.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoMerge Marked for automatic merge by the bot when requirements are met Needs-Second It's a PR that needs another sign-off
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Console Terminal "Cursor Shape" gets reset when opening "Options" propsheet
4 participants