mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	swaylock: don't try to render unconfigured surfaces
This commit is contained in:
		
							parent
							
								
									cd0fca2ebf
								
							
						
					
					
						commit
						32f8ade7ab
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -17,6 +17,9 @@ void render_frame(struct swaylock_surface *surface) {
 | 
			
		|||
 | 
			
		||||
	int buffer_width = surface->width * surface->scale;
 | 
			
		||||
	int buffer_height = surface->height * surface->scale;
 | 
			
		||||
	if (buffer_width == 0 || buffer_height == 0) {
 | 
			
		||||
		return; // not yet configured
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	surface->current_buffer = get_next_buffer(state->shm,
 | 
			
		||||
			surface->buffers, buffer_width, buffer_height);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue