refactor: use views NonClientHitTest for draggable regions on mac (#35603)
* refactor: use views NonClientHitTest for draggable regions on mac * iwyu * add backport of 9bb5f0316 * chore: update patches * remove some unneeded functions * remove test for triggering when BW is focused * chore: update patches * simplify views/mac split now that the draggable logic is the same * Apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * Update shell/browser/native_window.h Co-authored-by: Charles Kerr <charles@charleskerr.com> * fix build Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
7ce94eb0b4
commit
8a926ffde4
15 changed files with 70 additions and 392 deletions
7
shell/browser/native_window.cc
Executable file → Normal file
7
shell/browser/native_window.cc
Executable file → Normal file
|
@ -14,11 +14,13 @@
|
|||
#include "content/public/browser/web_contents_user_data.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/native_window_features.h"
|
||||
#include "shell/browser/ui/drag_util.h"
|
||||
#include "shell/browser/window_list.h"
|
||||
#include "shell/common/color_util.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/persistent_dictionary.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "third_party/skia/include/core/SkRegion.h"
|
||||
#include "ui/views/widget/widget.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
|
@ -683,6 +685,11 @@ void NativeWindow::NotifyWindowMessage(UINT message,
|
|||
}
|
||||
#endif
|
||||
|
||||
void NativeWindow::UpdateDraggableRegions(
|
||||
const std::vector<mojom::DraggableRegionPtr>& regions) {
|
||||
draggable_region_ = DraggableRegionsToSkRegion(regions);
|
||||
}
|
||||
|
||||
views::Widget* NativeWindow::GetWidget() {
|
||||
return widget();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue