2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:45:47 -0700
|
|
|
|
Subject: disable_hidden.patch
|
|
|
|
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
2019-07-24 22:58:51 +00:00
|
|
|
index 8278ff4f07e5a18941521c92c819d099636b96b4..8606461c0422460e5d2d6adab0fea4ad8060ece5 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
|
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
2019-07-24 22:58:51 +00:00
|
|
|
@@ -670,6 +670,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
2018-09-14 05:02:16 +00:00
|
|
|
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
|
2019-07-24 22:58:51 +00:00
|
|
|
index 350770092301beffa86a658a5c42276b238d0800..9296c0ad7f83cd4a5dce041de2fb97a537e44858 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
|
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
2019-07-24 22:58:51 +00:00
|
|
|
@@ -156,6 +156,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
2018-09-14 05:02:16 +00:00
|
|
|
// 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;
|
|
|
|
}
|