|
@@ -24,6 +24,10 @@
|
|
|
#include "ui/base/hit_test.h"
|
|
|
#include "ui/views/widget/widget.h"
|
|
|
|
|
|
+#if !BUILDFLAG(IS_MAC)
|
|
|
+#include "shell/browser/ui/views/frameless_view.h"
|
|
|
+#endif
|
|
|
+
|
|
|
#if BUILDFLAG(IS_WIN)
|
|
|
#include "ui/base/win/shell.h"
|
|
|
#include "ui/display/win/screen_win.h"
|
|
@@ -691,6 +695,17 @@ void NativeWindow::NotifyWindowMessage(UINT message,
|
|
|
#endif
|
|
|
|
|
|
int NativeWindow::NonClientHitTest(const gfx::Point& point) {
|
|
|
+#if !BUILDFLAG(IS_MAC)
|
|
|
+ // We need to ensure we account for resizing borders on Windows and Linux.
|
|
|
+ if ((!has_frame() || has_client_frame()) && IsResizable()) {
|
|
|
+ auto* frame =
|
|
|
+ static_cast<FramelessView*>(widget()->non_client_view()->frame_view());
|
|
|
+ int border_hit = frame->ResizingBorderHitTest(point);
|
|
|
+ if (border_hit != HTNOWHERE)
|
|
|
+ return border_hit;
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
for (auto* provider : draggable_region_providers_) {
|
|
|
int hit = provider->NonClientHitTest(point);
|
|
|
if (hit != HTNOWHERE)
|