Skip to content

Commit

Permalink
[VerticalTabs] Fix drag-and-drop of text/links not working for the la…
Browse files Browse the repository at this point in the history
…st two tabs.
  • Loading branch information
jagadeshjai authored and simonhong committed Jan 14, 2025
1 parent 4e16610 commit 791df83
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions chromium_src/chrome/browser/ui/views/frame/browser_root_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@

#include "brave/browser/ui/views/tabs/vertical_tab_utils.h"

#define ConvertPointToTarget(THIS, TARGET_GETTER, POINT) \
if (views::View* target_v = TARGET_GETTER; \
tabs::utils::ShouldShowVerticalTabs(browser_view_->browser()) && \
(target_v == tabstrip() || !THIS->Contains(target_v))) { \
ConvertPointToScreen(target_v, POINT); \
ConvertPointFromScreen(THIS, POINT); \
} else { \
ConvertPointToTarget(THIS, target_v, POINT); \
// Workaround for vertical tabs to work with drag&drop of text/links.
#define ConvertPointToTarget(THIS, TARGET_GETTER, POINT) \
if (views::View* target_v = TARGET_GETTER; \
tabs::utils::ShouldShowVerticalTabs(browser_view_->browser()) && \
(target_v == tabstrip() || !THIS->Contains(target_v))) { \
ConvertPointToScreen(THIS, POINT); \
ConvertPointFromScreen(target_v, POINT); \
} else { \
ConvertPointToTarget(THIS, target_v, POINT); \
}

#include "src/chrome/browser/ui/views/frame/browser_root_view.cc"
Expand Down

0 comments on commit 791df83

Please sign in to comment.