mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Emit output resolution event only when resolution changes
This commit is contained in:
		
							parent
							
								
									018cd98620
								
							
						
					
					
						commit
						ecb2a2b0d3
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -437,10 +437,12 @@ static bool wlr_drm_connector_set_mode(struct wlr_output *output,
 | 
			
		|||
		crtc->cursor ? crtc->cursor - drm->cursor_planes : -1);
 | 
			
		||||
 | 
			
		||||
	conn->state = WLR_DRM_CONN_CONNECTED;
 | 
			
		||||
	conn->output.width = mode->width;
 | 
			
		||||
	conn->output.height = mode->height;
 | 
			
		||||
	conn->output.current_mode = mode;
 | 
			
		||||
	wl_signal_emit(&conn->output.events.resolution, &conn->output);
 | 
			
		||||
	if (conn->output.width != mode->width || conn->output.height != mode->height) {
 | 
			
		||||
		conn->output.width = mode->width;
 | 
			
		||||
		conn->output.height = mode->height;
 | 
			
		||||
		wl_signal_emit(&conn->output.events.resolution, &conn->output);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Since realloc_crtcs can deallocate planes on OTHER outputs,
 | 
			
		||||
	// we actually need to reinitalise all of them
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue