mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	surface: don't unset width and height in finalize
During surface finalization we may not have received a new buffer, resetting width and height in this case is wrong since we display the old buffer in this case.
This commit is contained in:
		
							parent
							
								
									c768309ab4
								
							
						
					
					
						commit
						c18c419b56
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -174,16 +174,16 @@ static void surface_state_finalize(struct wlr_surface *surface,
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (state->buffer_resource != NULL) {
 | 
						if (state->viewport.has_dst) {
 | 
				
			||||||
		if (state->viewport.has_dst) {
 | 
							if (state->buffer_width == 0 && state->buffer_height == 0) {
 | 
				
			||||||
 | 
								state->width = state->height = 0;
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
			state->width = state->viewport.dst_width;
 | 
								state->width = state->viewport.dst_width;
 | 
				
			||||||
			state->height = state->viewport.dst_height;
 | 
								state->height = state->viewport.dst_height;
 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			surface_state_viewport_src_size(state,
 | 
					 | 
				
			||||||
				&state->width, &state->height);
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		state->width = state->height = 0;
 | 
							surface_state_viewport_src_size(state,
 | 
				
			||||||
 | 
								&state->width, &state->height);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pixman_region32_intersect_rect(&state->surface_damage,
 | 
						pixman_region32_intersect_rect(&state->surface_damage,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue