Browse Source

fix: draggable regions shouldn't capture clicks on frames windows (#37741)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
trop[bot] 2 years ago
parent
commit
6101b9cd29
1 changed files with 3 additions and 0 deletions
  1. 3 0
      shell/browser/api/electron_api_web_contents.cc

+ 3 - 0
shell/browser/api/electron_api_web_contents.cc

@@ -1877,6 +1877,9 @@ void WebContents::MessageHost(const std::string& channel,
 
 void WebContents::UpdateDraggableRegions(
     std::vector<mojom::DraggableRegionPtr> regions) {
+  if (owner_window() && owner_window()->has_frame())
+    return;
+
   draggable_region_ = DraggableRegionsToSkRegion(regions);
 }