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

fix: menu border being created properly on Windows 11 #39099

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This should be upstreamed, as other uses of MenuController in this
file do check for menu controller being null.

diff --git a/ui/views/controls/menu/menu_scroll_view_container.cc b/ui/views/controls/menu/menu_scroll_view_container.cc
index c4f9cea175824f9f5d592e05affdf717a391dcd6..7163f3ff0c745ce1099685028179e5ed0c54ef05 100644
index c4f9cea175824f9f5d592e05affdf717a391dcd6..74e084e4d5398371e39042c2d0ab51e7040b9451 100644
--- a/ui/views/controls/menu/menu_scroll_view_container.cc
+++ b/ui/views/controls/menu/menu_scroll_view_container.cc
@@ -402,8 +402,7 @@ void MenuScrollViewContainer::CreateDefaultBorder() {
Expand All @@ -35,7 +35,7 @@ index c4f9cea175824f9f5d592e05affdf717a391dcd6..7163f3ff0c745ce1099685028179e5ed
- if (menu_config.use_bubble_border && (corner_radius_ > 0) &&
- !menu_controller->IsCombobox()) {
+ // Menu controller could be null during context menu being closed.
+ bool is_combobox = menu_controller && !menu_controller->IsCombobox();
+ bool is_combobox = menu_controller && menu_controller->IsCombobox();
+ if (menu_config.use_bubble_border && (corner_radius_ > 0) && !is_combobox) {
CreateBubbleBorder();
} else {
Expand Down