mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	output: reset hardware_cursor on failure
The DRM backend's set_cursor function always return true if the buffer is NULL. If using a NULL cursor's buffer on startup, the wlr_output_cursor will be marked as a hardware cursor. If the cursor later gains a non-NULL buffer and the DRM backend rejects that buffer, the cursor will remain marked as a hardware cursor, despite the backend not displaying it as such. As a result, the cursor will not be displayed at all. Fix this by always resetting the hardware_cursor field in output_cursor_attempt_hardware().
This commit is contained in:
		
							parent
							
								
									35c3194ae5
								
							
						
					
					
						commit
						36c0d5fe3a
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -280,6 +280,8 @@ static bool output_cursor_attempt_hardware(struct wlr_output_cursor *cursor) {
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						output->hardware_cursor = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct wlr_texture *texture = cursor->texture;
 | 
						struct wlr_texture *texture = cursor->texture;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// If the cursor was hidden or was a software cursor, the hardware
 | 
						// If the cursor was hidden or was a software cursor, the hardware
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue