fix: flicker and ghosting in transparent windows on macOS (#46393)
* fix: transparent flicker on MAS Co-authored-by: clavin <clavin@electronjs.org> * Gate condition on `IsTranslucent` instead Co-authored-by: clavin <clavin@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org>
This commit is contained in:
		
					parent
					
						
							
								6b1d1bf893
							
						
					
				
			
			
				commit
				
					
						17487df08d
					
				
			
		
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -196,6 +196,9 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
 | 
			
		|||
  params.type = views::Widget::InitParams::TYPE_WINDOW;
 | 
			
		||||
  // Allow painting before shown, to be later disabled in ElectronNSWindow.
 | 
			
		||||
  params.headless_mode = true;
 | 
			
		||||
  if (IsTranslucent()) {
 | 
			
		||||
    params.opacity = views::Widget::InitParams::WindowOpacity::kTranslucent;
 | 
			
		||||
  }
 | 
			
		||||
  params.native_widget =
 | 
			
		||||
      new ElectronNativeWidgetMac(this, windowType, styleMask, widget());
 | 
			
		||||
  widget()->Init(std::move(params));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue