From 6cc57ea5c9b80e50fb1426f99bdae061b1174005 Mon Sep 17 00:00:00 2001 From: Blaise Date: Wed, 14 Jun 2023 11:02:09 -0500 Subject: [PATCH] Fix for tabsearch on Windows --- .../add-flag-for-tabsearch-button.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) 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 @@