diff --git a/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch b/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch index 692e3211..fbc3fe06 100644 --- a/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch +++ b/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch @@ -10,6 +10,26 @@ command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH, enable_tab_search_commands); command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH_CLOSE, +--- a/chrome/browser/ui/frame/window_frame_util.cc ++++ b/chrome/browser/ui/frame/window_frame_util.cc +@@ -8,6 +8,7 @@ + #include "ui/gfx/geometry/size.h" + + #if BUILDFLAG(IS_WIN) ++#include "base/command_line.h" + #include "chrome/browser/ui/browser.h" + #include "chrome/browser/ui/ui_features.h" + #endif // BUILDFLAG(IS_WIN) +@@ -34,7 +35,8 @@ gfx::Size WindowFrameUtil::GetWindows10G + bool WindowFrameUtil::IsWin10TabSearchCaptionButtonEnabled( + const Browser* browser) { + #if BUILDFLAG(IS_WIN) +- return browser->is_type_normal(); ++ return browser->is_type_normal() && ++ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button"); + #else + return false; + #endif // BUILDFLAG(IS_WIN) --- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc +++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc @@ -4,6 +4,7 @@