views: Fix crash when clicking a draggable region (fixes issue #3311)

This commit is contained in:
Marshall Greenblatt
2022-04-14 15:12:23 -04:00
parent fc82de7aa7
commit cbf66a8077
2 changed files with 23 additions and 1 deletions

View File

@@ -16,7 +16,13 @@
// CefViewView template.
class WebViewEx : public views::WebView {
public:
WebViewEx() : views::WebView(nullptr) {}
WebViewEx() : views::WebView(nullptr) {
// Mouse events on draggable regions will not be handled by the WebView.
// Avoid the resulting DCHECK in NativeViewHost::OnMousePressed by
// configuring the NativeViewHost not to process events via the view
// hierarchy.
holder()->SetCanProcessEventsWithinSubtree(false);
}
};
class CefBrowserViewView