$OpenBSD: patch-ui_views_focus_focus_manager_cc,v 1.11 2021/11/16 11:28:47 robert Exp $

Index: ui/views/focus/focus_manager.cc
--- ui/views/focus/focus_manager.cc.orig
+++ ui/views/focus/focus_manager.cc
@@ -634,7 +634,7 @@ bool FocusManager::RedirectAcceleratorToBubbleAnchorWi
 
 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
 // of lacros-chrome is complete.
-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD)
   // Processing an accelerator can delete things. Because we
   // need these objects afterwards on Linux, save widget_ as weak pointer and
   // save the close_on_deactivate property value of widget_delegate in a
@@ -651,7 +651,7 @@ bool FocusManager::RedirectAcceleratorToBubbleAnchorWi
 
 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
 // of lacros-chrome is complete.
-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD)
   // Need to manually close the bubble widget on Linux. On Linux when the
   // bubble is shown, the main widget remains active. Because of that when
   // focus is set to the main widget to process accelerator, the main widget
