Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix ComboBox dropdown height after clearing or removing all items #14632
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
base: main
Are you sure you want to change the base?
Fix ComboBox dropdown height after clearing or removing all items #14632
Changes from all commits
4f4549ca763143707852c9f33e1767bec0ecd0c96f780acb4File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
The
WM_WINDOWPOSCHANGINGhandler unconditionally overrides the dropdown height for every position-change event (as long asSWP_NOSIZEis not set):This means if the OS intentionally adjusts the dropdown height for legitimate reasons (DPI changes, integral height adjustments, display-edge clamping, or monitor work-area boundaries), the fix will forcefully override it. A safer approach would be to limit the intercept to specific scenarios — e.g., only when the dropdown is initially opening or when items have changed.
If the dropdown is near the bottom of the screen, the OS may reduce the dropdown height to fit within the work area. The current fix would override that clamped value back to the full calculated height, potentially causing the dropdown to extend off-screen. The fix should respect
pos->cywhen it's smaller than the calculated height if the dropdown position is near a screen edge.Uh oh!
There was an error while loading. Please reload this page.