-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Conversation
There was a problem hiding this 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.
Hello @zadjii-msft! Because this pull request has the 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 (
|
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! |
@DHowett-MSFT Already checked, it isn't :) |
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.
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.