2018-10-24 11:24:11 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-20 17:30:26 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								From: Cheng Zhao <zcbenz@gmail.com>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Date: Thu, 20 Sep 2018 17:45:47 -0700
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Subject: disable_hidden.patch
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-12-13 09:18:45 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Electron uses this to disable background throttling for hidden windows.
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-20 17:30:26 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-16 16:14:43 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								index f54d14751b4885b2fa6483e81aaa8f495cc1fc8c..025965f6171b3ddd77d6adcf4eb4c711544c81db 100644
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								--- a/content/browser/renderer_host/render_widget_host_impl.cc
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ b/content/browser/renderer_host/render_widget_host_impl.cc
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-22 10:51:15 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -800,6 +800,9 @@ void RenderWidgetHostImpl::WasHidden() {
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								     return;
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-23 14:58:58 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								   }
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+  if (disable_hidden_)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    return;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-14 13:54:14 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								   RejectMouseLockOrUnlockIfNecessary(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								       blink::mojom::PointerLockResult::kWrongDocument);
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-22 10:51:15 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								index e74883df0950b2e462a7ebdde8a476259cf0f231..3033d9d9efd3302fba1698a8b8f549c4c00ab82e 100644
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								--- a/content/browser/renderer_host/render_widget_host_impl.h
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ b/content/browser/renderer_host/render_widget_host_impl.h
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-22 10:51:15 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -899,6 +899,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
							 | 
						
					
						
							
								
									
										
										
										
											2022-10-27 12:37:04 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								   void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                   cc::BrowserControlsState current,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                   bool animate);
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+  // Electron: Prevents the widget from getting hidden.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+  bool disable_hidden_ = false;
							 | 
						
					
						
							
								
									
										
										
										
											2022-10-27 12:37:04 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 
							 | 
						
					
						
							
								
									
										
										
										
											2021-02-09 12:16:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  protected:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   // |routing_id| must not be MSG_ROUTING_NONE.
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-26 20:54:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-16 16:14:43 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								index fc773d1601a7fae8bf4a70b0d277f36e1f091a6f..02a3d39508397e90133eb4adad79515d507f14ea 100644
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-26 20:54:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-14 16:59:54 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -606,7 +606,7 @@ void RenderWidgetHostViewAura::HideImpl() {
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-26 20:54:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								   DCHECK(visibility_ == Visibility::HIDDEN ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          visibility_ == Visibility::OCCLUDED);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								-  if (!host()->is_hidden()) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+  if (!host()->is_hidden() && !host()->disable_hidden_) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								     host()->WasHidden();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								     aura::WindowTreeHost* host = window_->GetHost();
							 | 
						
					
						
							
								
									
										
										
										
											2021-02-09 12:16:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								       aura::Window* parent = window_->parent();
							 |