mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: draggable regions not working (#41030)
* fix: draggable regions not working * fix: only support app regions for main frame --------- Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_script_source.h"
|
||||
#include "third_party/blink/public/web/web_view.h"
|
||||
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h" // nogncheck
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
@@ -55,6 +56,11 @@ ElectronRenderFrameObserver::ElectronRenderFrameObserver(
|
||||
renderer_client_(renderer_client) {
|
||||
// Initialise resource for directory listing.
|
||||
net::NetModule::SetResourceProvider(NetResourceProvider);
|
||||
|
||||
// App regions are only supported in the main frame.
|
||||
auto* main_frame = frame->GetMainRenderFrame();
|
||||
if (main_frame && main_frame == frame)
|
||||
render_frame_->GetWebView()->SetSupportsAppRegion(true);
|
||||
}
|
||||
|
||||
void ElectronRenderFrameObserver::DidClearWindowObject() {
|
||||
|
||||
Reference in New Issue
Block a user