db21391156
Co-authored-by: Erick Zhao <erickzhao@github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by Micha Hanselmann <DeerMichel@github.com>
34 lines
1.4 KiB
Diff
34 lines
1.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
|
|
|
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
index f9d900c686f6e265c029d281ab04bc37c803fcc5..4e115c09f034cfb6913c97c719b855126ab78624 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
@@ -676,6 +676,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
|
if (is_hidden_)
|
|
return;
|
|
|
|
+ if (disable_hidden_)
|
|
+ return;
|
|
+
|
|
RejectMouseLockOrUnlockIfNecessary();
|
|
|
|
TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
|
index e81662ef6b24eb03656a6f1b11b619906edda505..de56061588bb5a26b3ced56a56f56e56900fe10d 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
|
@@ -183,6 +183,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
|
// RenderWidgetHostImpl.
|
|
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
|
|
|
|
+ // Electron: Prevents the widget from getting hidden.
|
|
+ bool disable_hidden_ = false;
|
|
+
|
|
void set_hung_renderer_delay(const base::TimeDelta& delay) {
|
|
hung_renderer_delay_ = delay;
|
|
}
|