![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 136.0.7066.0 * chore: bump chromium in DEPS to 136.0.7067.0 * 6325710: [LNA] Add Local Network Access permission type Refs6325710
* 6342514: Create frame mojo endpoints in renderer during window.open() Refs6342514
* 6344040: Create widget mojo endpoints in renderer process for window.open() Refs6344040
* chore: update patches * 6349218: Move ExtensionService::install_directory() to ExtensionRegistrar Refs6349218
* 6349395: Move ExtensionService::extensions_enabled() to ExtensionRegistrar Refs6349395
* 6331510: Migrate views::Background class to ui::ColorVariant |6331510
* build: reorder set-cookie step https://github.com/electron/electron/pull/46091 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: alice <alice@makenotion.com>
49 lines
2.4 KiB
Diff
49 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
Date: Thu, 20 Sep 2018 17:45:47 -0700
|
|
Subject: disable_hidden.patch
|
|
|
|
Electron uses this to disable background throttling for hidden windows.
|
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
index 22ffafd8f5e0f49d5c9df7ecd3f61dad3dfd2814..a409c64768968c81be3b6c7e7646f8df26e2afe6 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
@@ -832,6 +832,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
|
return;
|
|
}
|
|
|
|
+ if (disable_hidden_) {
|
|
+ return;
|
|
+ }
|
|
+
|
|
// Cancel pending pointer lock requests, unless there's an open user prompt.
|
|
// Prompts should remain open and functional across tab switches.
|
|
if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) {
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
|
index c201cff9e5c3b286389a5eb74e1a9ebd86edfef9..949f6a7867758e35c24897add9a4d47a641357b2 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
|
@@ -1012,6 +1012,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
|
// Requests a commit and forced redraw in the renderer compositor.
|
|
void ForceRedrawForTesting();
|
|
|
|
+ // Electron: Prevents the widget from getting hidden.
|
|
+ bool disable_hidden_ = false;
|
|
+
|
|
protected:
|
|
// |routing_id| must not be MSG_ROUTING_NONE.
|
|
// If this object outlives |delegate|, DetachDelegate() must be called when
|
|
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
index 70f368ab0c59e7f495cb13094160d72f601e0938..19d2df47b0c929558ac8cfc208742dfef463a68b 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
@@ -643,7 +643,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
|
CHECK(visibility_ == Visibility::HIDDEN ||
|
|
visibility_ == Visibility::OCCLUDED);
|
|
|
|
- if (!host()->is_hidden()) {
|
|
+ if (!host()->is_hidden() && !host()->disable_hidden_) {
|
|
host()->WasHidden();
|
|
aura::WindowTreeHost* host = window_->GetHost();
|
|
aura::Window* parent = window_->parent();
|