fix: don't unnecessarily copy draggable regions (#21704)
This commit is contained in:
parent
768a6ace1b
commit
f461dc7002
1 changed files with 5 additions and 3 deletions
|
@ -101,9 +101,11 @@ void BrowserWindow::UpdateDraggableRegions(
|
||||||
|
|
||||||
// Draggable regions is implemented by having the whole web view draggable
|
// Draggable regions is implemented by having the whole web view draggable
|
||||||
// (mouseDownCanMoveWindow) and overlaying regions that are not draggable.
|
// (mouseDownCanMoveWindow) and overlaying regions that are not draggable.
|
||||||
|
if (&draggable_regions_ != ®ions) {
|
||||||
draggable_regions_.clear();
|
draggable_regions_.clear();
|
||||||
for (const auto& r : regions)
|
for (const auto& r : regions)
|
||||||
draggable_regions_.push_back(r.Clone());
|
draggable_regions_.push_back(r.Clone());
|
||||||
|
}
|
||||||
std::vector<gfx::Rect> drag_exclude_rects;
|
std::vector<gfx::Rect> drag_exclude_rects;
|
||||||
if (regions.empty()) {
|
if (regions.empty()) {
|
||||||
drag_exclude_rects.push_back(gfx::Rect(0, 0, webViewWidth, webViewHeight));
|
drag_exclude_rects.push_back(gfx::Rect(0, 0, webViewWidth, webViewHeight));
|
||||||
|
|
Loading…
Reference in a new issue